下载了 PanJiaChen/vue-admin-template
的模板,但 npm install
安装不成功(把镜像换成了淘宝的镜像)。
显示:
npm warn deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm error code 1
npm error path E:\a\vue-admin-template\vue-admin-template\node_modules\node-sass
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node scripts/build.js
npm error Building: C:\Program Files\nodejs\node.exe E:\a\vue-admin-template\vue-admin-template\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
npm error gyp info it worked if it ends with ok
npm error gyp verb cli [
npm error gyp verb cli 'C:\\Program Files\\nodejs\\node.exe',
npm error gyp verb cli 'E:\\a\\vue-admin-template\\vue-admin-template\\node_modules\\node-gyp\\bin\\node-gyp.js',
npm error gyp verb cli 'rebuild',
npm error gyp verb cli '--verbose',
npm error gyp verb cli '--libsass_ext=',
npm error gyp verb cli '--libsass_cflags=',
npm error gyp verb cli '--libsass_ldflags=',
npm error gyp verb cli '--libsass_library='
npm error gyp verb cli ]
npm error gyp info using node-gyp@3.8.0
npm error gyp info using node@18.17.1 | win32 | x64
npm error gyp verb command rebuild []
npm error gyp verb command clean []
npm error gyp verb clean removing "build" directory
npm error gyp verb command configure []
npm error gyp verb download using dist-url https://npm.taobao.org/dist
npm error gyp verb check python checking for Python executable "python2" in the PATH
npm error gyp verb `which` failed Error: not found: python2
npm error gyp verb `which` failed at getNotFoundError (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:13:12)
npm error gyp verb `which` failed at F (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:68:19)
npm error gyp verb `which` failed at E (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:80:29)
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:89:16
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\index.js:42:5
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\windows.js:36:5
npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:210:21)
npm error gyp verb `which` failed python2 Error: not found: python2
npm error gyp verb `which` failed at getNotFoundError (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:13:12)
npm error gyp verb `which` failed at F (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:68:19)
npm error gyp verb `which` failed at E (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:80:29)
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:89:16
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\index.js:42:5
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\windows.js:36:5
npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:210:21) {
npm error gyp verb `which` failed code: 'ENOENT'
npm error gyp verb `which` failed }
npm error gyp verb check python checking for Python executable "python" in the PATH
npm error gyp verb `which` failed Error: not found: python
npm error gyp verb `which` failed at getNotFoundError (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:13:12)
npm error gyp verb `which` failed at F (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:68:19)
npm error gyp verb `which` failed at E (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:80:29)
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:89:16
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\index.js:42:5
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\windows.js:36:5
npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:210:21)
npm error gyp verb `which` failed python Error: not found: python
npm error gyp verb `which` failed at getNotFoundError (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:13:12)
npm error gyp verb `which` failed at F (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:68:19)
npm error gyp verb `which` failed at E (E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:80:29)
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\which\which.js:89:16
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\index.js:42:5
npm error gyp verb `which` failed at E:\a\vue-admin-template\vue-admin-template\node_modules\isexe\windows.js:36:5
npm error gyp verb `which` failed at FSReqCallback.oncomplete (node:fs:210:21) {
npm error gyp verb `which` failed code: 'ENOENT'
npm error gyp verb `which` failed }
npm error gyp verb could not find "python". checking python launcher
npm error gyp verb could not find "python". guessing location
npm error gyp verb ensuring that file exists: C:\Python27\python.exe
npm error gyp ERR! configure error
npm error gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
npm error gyp ERR! stack at PythonFinder.failNoPython (E:\a\vue-admin-template\vue-admin-template\node_modules\node-gyp\lib\configure.js:484:19)
npm error gyp ERR! stack at PythonFinder.<anonymous> (E:\a\vue-admin-template\vue-admin-template\node_modules\node-gyp\lib\configure.js:509:16)
npm error gyp ERR! stack at callback (E:\a\vue-admin-template\vue-admin-template\node_modules\graceful-fs\polyfills.js:306:20)
npm error gyp ERR! stack at FSReqCallback.oncomplete (node:fs:210:21)
npm error gyp ERR! System Windows_NT 10.0.19045
npm error gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\a\\vue-admin-template\\vue-admin-template\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext="
"--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm error gyp ERR! cwd E:\a\vue-admin-template\vue-admin-template\node_modules\node-sass
npm error gyp ERR! node -v v18.17.1
npm error gyp ERR! node-gyp -v v3.8.0
npm error gyp ERR! not ok
npm error Build failed with error code: 1
npm error A complete log of this run can be found in: C:\Users\Komorebi\AppData\Local\npm-cache\_logs\2024-07-28T06_16_21_102Z-debug-0.log
看起来是没有成功切换到新的淘宝源(
https://registry.npmmirror.com
)老的域名
npm.taobao.org
已经在 2024-01-22 过期。node-sass
在安装过程中安装失败会尝试本地build
,本地编译会需要py
环境,所以会有遇到OP你贴出来的报错信息:切换到新的淘宝源地址就好了。
相关链接