在cnpm install的时候发生问题
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 PythonFinder.failNoPython (D:\work\i-tax-base-front-haidilao\node_modules\_node-gyp@3.8.0@node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder.<anonymous> (D:\work\i-tax-base-front-haidilao\node_modules\_node-gyp@3.8.0@node-gyp\lib\configure.js:509:16)
gyp ERR! stack at callback (D:\work\i-tax-base-front-haidilao\node_modules\_graceful-fs@4.2.9@graceful-fs\polyfills.js:299:20)
gyp ERR! stack at FSReqCallback.oncomplete (node:fs:198:21)
gyp ERR! System Windows_NT 10.0.19043
gyp ERR! command "D:\\软件安装\\Node\\node.exe" "D:\\work\\i-tax-base-front-haidilao\\node_modules\\_node-gyp@3.8.0@node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\work\i-tax-base-front-haidilao\node_modules\_node-sass@4.14.1@node-sass
gyp ERR! node -v v16.13.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
[npminstall:runscript:error] node-sass@^4.11.0 scripts.postinstall run "node scripts/build.js" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
请问这个是什么问题如何解决
运行这个试试 npm install --global --production windows-build-tools
安装 node-sass 报错了 尝试重新安装一下吧
没有安装python环境,需要安装
安装教程:
https://blog.csdn.net/qq_38053195/article/details/87070583
node和node-sass的版本不匹配把
可以降低一下node的版本换成稳点版本v14点几的
还有就是没有安装python环境
1: 删除node_modules文件夹和package-lock.json
2::卸载现有版本(版本太高)
3:选择12.17.0 node版本下载
4:npm i 即可
5:node下载地址
链接:https://pan.baidu.com/s/1GABdnUc9XDBkVCl8qOqaBw?pwd=4xpv
提取码:4xpv
如不行,请看一下package.json文件中
vue": "2.6.10",
"vue-template-compiler": "2.6.10" 版本是否一致
最后,重新步骤1,4