-
-
Notifications
You must be signed in to change notification settings - Fork 30.6k
Closed
Description
下载项目的时候run install时,node-sass下载失败后来我在项目根目录下添加了一个.npmrc
sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=https://registry.npm.taobao.org
把node-sass的路径修改成淘宝的npm,就很顺利的可以在国内的网络环境下载了
ncusoho, coco-bike, wmhello, objectfindsuccess, John-Zuo and 84 moreychunc, zhushimao123, weiweidong1993, studyJavaStudy, phperchou and 6 morecnjianghu, powercen, ychunc, dcq2016, iveraLiu and 6 moreychunc, 3026546679, echo-dc, Shimiankang, yyds-hfg and 2 moreychunc, 3026546679, Shimiankang, chenguanruVIP, bruce-jia-jun and 2 moreobjectfindsuccess, kolien233, John-Zuo, ychunc, taoyao-code and 12 moreychunc, HarveyZgit, MrZhang20191201, zhou-zql, Slodezzm and 6 moreychunc, Ankhyang, CSM97119, phperchou, Emperor-zhang and 19 more
Activity
PanJiaChen commentedon May 4, 2017
这和该项目无关。。。node-sass普遍就是下载有问题
文档里也写了解决的方法
//建议不要用cnpm 安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题
npm install --registry=https://registry.npm.taobao.org
感谢提供了解决方案
[-]node-sass 下载失败[/-][+]node-sass 下载失败 解决方案[/+]longzhaobi commentedon May 4, 2017
我项目一般都用yarn。全局用npm
fuerpeng commentedon May 18, 2017
试过上面方法还不行的同学 ,可以把package.json中的node-scss依赖改为:"node-sass": "^4.5.0",
Selina9101118 commentedon Jun 15, 2017
npm install --registry=https://registry.npm.taobao.org执行的时候,
出现错误
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
然后又去下载python安装后设置了环境变量,
然后又重新执行npm install --registry=https://registry.npm.taobao.org
启动项目,一直报没有sass-loader和node-sass模块,
然后我的解决方案是分别执行这两条命令:
1、npm install sass-loader --save-dev
2、npm install node-sass --save-dev
头痛了一下午的问题终于解决了,泪奔啊。
希望对你们有帮助。
xinkule commentedon Jun 17, 2017
我补充一下楼上的,下载python一定要记得是2.X版本的,不然也会一直提示找不到
fandaxia commentedon Apr 24, 2018
翻一下墙用npm安装就好了
XzwAndy commentedon Jun 26, 2018
安装Python3,提示找不到 2 ,安装Python 2 后报 node-sass 错误,我的解决办法:
1、先卸载 npm uninstall node-sass,
2、重新安装 npm install --registry=https://registry.npm.taobao.org
macheng1 commentedon Nov 7, 2018
還是安裝不了
Xrq1995 commentedon Nov 30, 2018
第一,我可以 查看到 node-sass 的版本号 是4.10.0
C:\WINDOWS\system32>node-sass -v
node-sass 4.10.0 (Wrapper) [JavaScript]
libsass 3.5.4 (Sass Compiler) [C/C++]
第二,运行还是报错 如下:
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。
生成启动时间为 2018/11/30 23:50:06。
MSBUILD : error MSB4132: 无法识别工具版本“2.0”。可用的工具版本为 "4.0"。
生成失败。
MSBUILD : error MSB4132: 无法识别工具版本“2.0”。可用的工具版本为 "4.0"。
已用时间 00:00:00.50
gyp ERR! build error
gyp ERR! stack Error:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.exe
failed with exit code: 1gyp ERR! stack at ChildProcess.onExit (C:\Users\18756\Desktop\vue-element-admin-master-1130-test\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Users\18756\Desktop\vue-element-admin-master-1130-test\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd C:\Users\18756\Desktop\vue-element-admin-master-1130-test\node_modules\node-sass
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
npm WARN script-ext-html-webpack-plugin@2.0.1 requires a peer of html-webpack-plugin@^3.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.10.0 postinstall:
node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.10.0 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
valleylmh commentedon Dec 6, 2018
从最新的master分支克隆下来没法安装依赖包


npm install 报错信息如下
换yarn安装也报错
请教各位大佬们,你们遇到过这种问题吗?
jasonchrion commentedon Dec 6, 2018
我也是,重装了nvm,node,vue等还是不行
joker-ssh commentedon Dec 7, 2018
我同上
jasonchrion commentedon Dec 7, 2018
问题解决了,是git版本的问题,重新安装非release版本2.20即可
133 remaining items
hong-zhanqiang commentedon Nov 4, 2022
npm ERR! Error while executing:
npm ERR! E:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git
npm ERR!
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\hong'zhan'qiang\AppData\Roaming\npm-cache_logs\2022-11-04T13_55_58_488Z-debug.log
出现这个问题怎么弄啊
ALEXMORCER87 commentedon Feb 3, 2023
ALEXMORCER87 commentedon Feb 5, 2023
安装了python环境,但是报这个错误
ALEXMORCER87 commentedon Feb 5, 2023
项目无法启动的问题解决方案:node19 版本过高,需要降低版本,我降到了17.9.1
相关链接
https://blog.csdn.net/weixin_44582077/article/details/110237056
再按照 之前的
npm install --registry=https://registry.npm.taobao.org
npm run dev ("dev": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve", //pakege-json的scripts里加上前缀启动项目)
fjqken commentedon Feb 24, 2023
这个老哥的实测有用
RaverHui commentedon Mar 1, 2023
大佬 有答案了吗
cczxsong commentedon Apr 6, 2023
重新设置一下ssh key就好了
yuanbaoerer commentedon May 15, 2023
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/adobe-webplatform/eve.git
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\31031\AppData\Local\npm-cache_logs\2023-05-15T10_54_04_122Z-debug-0.log
有大佬知道我这里是什么问题吗?
Solaire-zero commentedon Jun 26, 2023
我这里是windows
用管理员权限打开powershell并cd到目录
执行 npm cache clean --force 后再install就可以了
iHTCboy commentedon Jul 25, 2023
Mac M1 ,用 v14.17.5 一直不行,最后,升级到 node v14.21.3 (npm v6.14.18) 就解决了 0.0
sxz156178 commentedon Sep 13, 2023
找到一篇文章 按照文章的版本就可以成功:https://blog.csdn.net/lwj_07/article/details/127845777
如果有出现chromedriverxxxxx:下载这个文件
https://npm.taobao.org/mirrors/chromedriver/2.27/chromedriver_win32.zip
npm install chromedriver --chromedriver_filepath=你的下载路径\chromedriver_win32.zip
这样就可以解决chromedriver下载失败的问题了
caoyunyou commentedon Dec 18, 2023
这边调整npm 版本为 12.13.1 就行了
可以先用 nvm 调整 nodejs 版本为 12.13.1
然后删除 node_modules 和 package-lock.json 文件
然后重新下载 npm i
mrwangjing commentedon Mar 7, 2024
https://blog.csdn.net/zhu7478848/article/details/128642538 按照这个版本对照,查看package.json里的 "node-sass": "^4.9.0", 下载node10 版本安装,然后删除 node_modules 和 package-lock.json 文件,然后重新下载 npm i 问题解决
BuHuang0317 commentedon Aug 20, 2024
问题大都遇了个遍,稍微整理下自己遇到的2个问题
1.git未配置ssh密钥的问题
主要提示:
例1: code :128 ;
例2: 1s-remote --tags --heads git://github, com/adobe-webplatform/eve.git ;
例3: An unknown git error occurred npm ERR!;
解决:配置ssh密钥即可(详见转载:https://www.cnblogs.com/cenima/p/17863883.html
2.首先看下自己的版本是否过高,我是16,跟楼上一个老哥是一样的,但是需要补充 :--legacy-peer-deps

忽略一些依赖问题