node-gyp 编译环境配置

45

重要提示

Python >= v3.12 requires node-gyp >= v10

npm install -g node-gyp

开发环境

python 3.6.0
node 16

安装choco工具

powershell管理员:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

命令行安装

choco install visualstudio2017-workload-vctools -y

设置

npm config set msvs_version 2017 --global