node v16.15.0
npm 8.5.5
npm install 报错
gyp verb check python checking for Python executable "python2" in the PATH
npm ERR! gyp verb which
failed Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (D:\demandindex\node_modules\which\which.js:13:12)
npm ERR! gyp verb which
failed at F (D:\demandindex\node_modules\which\which.js:68:19)
npm ERR! gyp verb which
failed at E (D:\demandindex\node_modules\which\which.js:80:29)
npm ERR! gyp verb which
failed at D:\demandindex\node_modules\which\which.js:89:16
npm ERR! gyp verb which
failed at D:\demandindex\node_modules\isexe\index.js:42:5
npm ERR! gyp verb which
failed at D:\demandindex\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:198:21)
npm ERR! gyp verb which
failed python2 Error: not found: python2
npm ERR! gyp verb which
failed at getNotFoundError (D:\demandindex\node_modules\which\which.js:13:12)
npm ERR! gyp verb which
failed at F (D:\demandindex\node_modules\which\which.js:68:19)
npm ERR! gyp verb which
failed at E (D:\demandindex\node_modules\which\which.js:80:29)
npm ERR! gyp verb which
failed at D:\demandindex\node_modules\which\which.js:89:16
npm ERR! gyp verb which
failed at D:\demandindex\node_modules\isexe\index.js:42:5
npm ERR! gyp verb which
failed at D:\demandindex\node_modules\isexe\windows.js:36:5
npm ERR! gyp verb which
failed at FSReqCallback.oncomplete (node:fs:198:21) {
npm ERR! gyp verb which
failed code: 'ENOENT'
npm ERR! gyp verb which
failed }
npm ERR! gyp verb check python checking for Python executable "python" in the PATH
npm ERR! gyp verb which
succeeded python C:\Program Files\python\python.EXE
npm ERR! gyp verb check python version C:\Program Files\python\python.EXE -c "import platform; print(platform.python_version());"
returned: "3.8.6\r\n"
最开始以为是缺少python2.7
安装了 python2.7 和 windows-build-tools以后依然报错
node-sass和 node版本不对应
我之前的node-sass版本是4.7.2
NodeJSSupported node-sass versionNode ModuleNode 177.0+102Node 166.0+93Node 155.0+,
Original: https://blog.csdn.net/qq_32182231/article/details/124762408
Author: 大碗拉面
Title: 项目场景: gyp verb check python checking for Python executable python2 in the PATH
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/729093/
转载文章受原作者版权保护。转载请注明原作者出处!