Environment introduction:

Windows10 node v14.8.0 NPM 6.14.8 PC user name: love2Copy the code

1. Global installationnode-gyp

npm install -g node-gyp
Copy the code

2. Global installationwindows-build-tools

NPM install --vs2015 --global windows-build-tools or YARN global add --vs2015 windows-build-toolsCopy the code

3.windows-build-toolsDisk C will be generated after the installation is successfulC:\Users\love2\.windows-build-toolsFolders will also be installed by defaultpythonAnd then set it in NPMpythonThe path andmsvs_versionVersion number, also putpythonAdd system environment variables to the path ofpathIn the.

Global Settings Python path: NPM config --global set python C:\Users\love2\. Windows-build-tools \python27 msvs_version NPM config --global set msvs_version 2015Copy the code