I've added node-options="--openssl-legacy-provider" into the .npmrc file, which I got from comment.
node-options="--openssl-legacy-provider"