PanJiaChen / electron-vue-admin

vue electron admin template web: http://panjiachen.github.io/vue-admin-template
3.16k stars 990 forks source link

我安装依赖的时候,报错 #78

Open Backru opened 1 year ago

Backru commented 1 year ago

npm错误!代码1

npm错误!路径D:\我的项目HT\电子vue管理主机\节点模块\节点sass

npm错误!命令失败

npm错误!命令C:\Windows\system32\cmd.exe/d/s/C节点脚本/build.js

npm错误!正在构建:C:\Program Files\nodejs\node.exe D:\My project HT\electron vue admin master\node_modules\node gyp\bin\node-gyp.js rebuild--verbose--libsass_ext=--libsass_cflags=--libsass_ldflags=--libsas_library=

npm错误!吉普赛信息,如果它以ok结束,它就起作用了

npm错误!吉普赛动词cli[

npm错误!gyp动词cli'C:\Program Files\nodejs\node.exe',

npm错误!gyp动词cli'D:\My project HT\electron vue admin master\node_modules\node gyp\bin\node gyp.js',

npm错误!gyp动词cli'rebuild',

npm错误!gyp动词cli'--verbose',

npm错误!gyp动词cli'--libsass_ext=',

npm错误!gyp动词cli'--libsass_cflags=',

npm错误!gyp动词cli'--libsass_ldflags=',

npm错误!gyp动词cli'--libsass_library='

npm错误!吉普赛语动词cli]

npm错误!gyp信息使用node-gyp@3.8.0

npm错误!gyp信息使用node@16.18.1| win32 | x64版本

npm错误!gyp谓词命令rebuild[]

npm错误!gyp动词命令clean[]

npm错误!gyp谓词clean删除“build”目录

npm错误!gyp谓词命令configure[]

npm错误!gyp谓词检查python在PATH中检查python可执行文件“python2”

npm错误!gyp动词“which”失败错误:未找到:python2

npm错误!gyp动词“which”在getNotFoundError处失败(D:\My project HT\electron vue admin master\node_modules\which\which.js:13:12)

npm错误!gyp动词“which”在F处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:68:19)

npm错误!gyp动词“which”在E处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:80:29)

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\which\which.js:89:16处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\index.js:42:5处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\windows.js:36:5处失败

npm错误!gyp谓词“which”在FSReqCallback.oncomplete时失败(节点:fs:202:21)

npm错误!gyp动词“which”使python2失败错误:找不到:python2

npm错误!gyp动词“which”在getNotFoundError处失败(D:\My project HT\electron vue admin master\node_modules\which\which.js:13:12)

npm错误!gyp动词“which”在F处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:68:19)

npm错误!gyp动词“which”在E处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:80:29)

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\which\which.js:89:16处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\index.js:42:5处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\windows.js:36:5处失败

npm错误!gyp谓词“which”在FSReqCallback.oncomplete时失败(节点:fs:202:21){

npm错误!gyp动词“which”失败代码:“ENOENT”

npm错误!吉卜赛动词which failed

npm错误!gyp谓词检查python在PATH中检查python可执行文件“python”

npm错误!gyp谓词“which”失败错误:未找到:python

npm错误!gyp动词“which”在getNotFoundError处失败(D:\My project HT\electron vue admin master\node_modules\which\which.js:13:12)

npm错误!gyp动词“which”在F处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:68:19)

npm错误!gyp动词“which”在E处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:80:29)

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\which\which.js:89:16处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\index.js:42:5处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\windows.js:36:5处失败

npm错误!gyp谓词“which”在FSReqCallback.oncomplete时失败(节点:fs:202:21)

npm错误!gyp谓词“which”失败python错误:未找到:python

npm错误!gyp动词“which”在getNotFoundError处失败(D:\My project HT\electron vue admin master\node_modules\which\which.js:13:12)

npm错误!gyp动词“which”在F处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:68:19)

npm错误!gyp动词“which”在E处失败(D:\My project HT\electron vue admin-master\node_modules\which\which.js:80:29)

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\which\which.js:89:16处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\index.js:42:5处失败

npm错误!gyp动词“which”在D:\My project HT\electron vue admin master\node_modules\isexe\windows.js:36:5处失败

npm错误!gyp谓词“which”在FSReqCallback.oncomplete时失败(节点:fs:202:21){

npm错误!gyp动词“which”失败代码:“ENOENT”

npm错误

WuPengLiang5 commented 10 months ago

删除 package.json 里的 node-sass和sass-loader, 执行npm install --save-dev sass-loader@7.0.1(后面版本号根据对应的webpack版本),直接执行npm install --save-dev sass-loader会报错(大概就是sass-loader版本号太高,与webpack不对应) 最后执行npm install node-sass --save dev。 可以试一下,我折腾了好久才跑起。