electron 项目安装遇到的问题

问题1

Can’t find Python executable “python”

gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack     at failNoPython (D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack     at D:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:64:11
gyp ERR! stack     at FSReqWrap.oncomplete (evalmachine.:95:15)
gyp ERR! System Windows_NT 6.3.9600
gyp ERR! command "node" "D:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd G:\nodejs\moviesite\node_modules\bcrypt
gyp ERR! node -v v7.0
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "D:\\Program Files\\nodejs\\\\node.exe" "D:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "bcrypt" "--save"

解决:安装python

问题2

MSBUILD : error MSB3428: 未能加载 Visual C++ 组件“VCBuild.exe”
解决:

npm install --global --production windows-build-tools  //需以管理员身份运行命令提示符(全局安装windows构建工具)

你可能感兴趣的:(Node.js)