1 2 3 4 5 6 7
| npm ERR! gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable. npm ERR! gyp ERR! stack at PythonFinder.failNoPython (D:\code\cesium-demo\node_modules\node-gyp\lib\configure.js:484:19) npm ERR! gyp ERR! stack at PythonFinder.<anonymous> (D:\code\cesium-demo\node_modules\node-gyp\lib\configure.js:509:16) npm ERR! gyp ERR! stack at callback (D:\code\cesium-demo\node_modules\graceful-fs\polyfills.js:306:20) npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (node:fs:202:21) npm ERR! gyp ERR! System Windows_NT 10.0.19045 npm ERR! gyp ERR! command "C:\\nvm\\nodejs\\node.exe" "D:\\code\\cesium-demo\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
|
设置变量 sass_binary_site,指向淘宝镜像地址。示例:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| npm i node-sass --sass_binary_site=https://registry.npmmirror.com/node-sass/
sass_binary_site=https://registry.npmmirror.com/binary.html?path=node-sass
SASS_BINARY_SITE=https://registry.npmmirror.com/node-sass/ npm install node-sass
set SASS_BINARY_SITE=https://registry.npmmirror.com/node-sass/ && npm install node-sass
npm config set sass_binary_site npm i node-sass --sass_binary_site=https://registry.npmmirror.com/node-sass/ npm install node-sass
|
https://www.npmjs.com/package/node-sass