一、node报错
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb `which` failed python2 Error: not found: python2
gyp verb `which` failed at getNotFoundError (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:13:12)
gyp verb `which` failed at F (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:68:19)
gyp verb `which` failed at E (E:\workspace\mall\mall-admin-web\node_modules\which\which.js:80:29)
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\which\which.js:89:16
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\index.js:42:5
gyp verb `which` failed at E:\workspace\mall\mall-admin-web\node_modules\isexe\windows.js:36:5
gyp verb `which` failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb `which` failed code: 'ENOENT'
gyp verb `which` failed }
1、网上常用方法一(本博主环境无效)
npm install --global --production windows-build-tools
这个的含义是在下载一个新的python,存放在本地目录下:C:\Users\A.windows-build-tools
如果你的机器没有装过python,那么这个命令有可能好使,但是,安装到这里的时候,它不会给你安装环境变量,你需要自己选择一下.
*本博主这个环境的python,之前就是好使的,命令窗口输入python,是可以返回版本号的,但是使用Node时候,它还是不识别路径.
3、本博主使用方法(当前有效)
1、确保NodeJS环境安装没有问题,如果不会安装,请参考
构建工具(参考工具部署方式)
相关文章推荐