Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-sass 下载失败 解决方案 #24

Closed
dongzm opened this issue May 4, 2017 · 150 comments
Closed

node-sass 下载失败 解决方案 #24

dongzm opened this issue May 4, 2017 · 150 comments

Comments

@dongzm
Copy link

dongzm commented May 4, 2017

下载项目的时候run install时,node-sass下载失败后来我在项目根目录下添加了一个.npmrc

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=https://registry.npm.taobao.org

把node-sass的路径修改成淘宝的npm,就很顺利的可以在国内的网络环境下载了

@PanJiaChen
Copy link
Owner

PanJiaChen commented May 4, 2017

这和该项目无关。。。node-sass普遍就是下载有问题
文档里也写了解决的方法

//建议不要用cnpm 安装有各种诡异的bug 可以通过如下操作解决npm速度慢的问题
npm install --registry=https://registry.npm.taobao.org

感谢提供了解决方案

@PanJiaChen PanJiaChen changed the title node-sass 下载失败 node-sass 下载失败 解决方案 May 4, 2017
@longzhaobi
Copy link

我项目一般都用yarn。全局用npm

@fuerpeng
Copy link

试过上面方法还不行的同学 ,可以把package.json中的node-scss依赖改为:"node-sass": "^4.5.0",

@Selina9101118
Copy link

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
Copy link

xinkule commented Jun 17, 2017

我补充一下楼上的,下载python一定要记得是2.X版本的,不然也会一直提示找不到

@fandaxia
Copy link

翻一下墙用npm安装就好了

@XzwAndy
Copy link

XzwAndy commented Jun 26, 2018

安装Python3,提示找不到 2 ,安装Python 2 后报 node-sass 错误,我的解决办法:
1、先卸载 npm uninstall node-sass,
2、重新安装 npm install --registry=https://registry.npm.taobao.org

@macheng1
Copy link

macheng1 commented Nov 7, 2018

還是安裝不了

@Xrq1995
Copy link

Xrq1995 commented 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"。

0 个警告
1 个错误

已用时间 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: 1
gyp 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
Copy link

从最新的master分支克隆下来没法安装依赖包
npm install 报错信息如下
image
换yarn安装也报错
image

请教各位大佬们,你们遇到过这种问题吗?

@jasonchrion
Copy link

从最新的master分支克隆下来没法安装依赖包
npm install 报错信息如下
image
换yarn安装也报错
image

请教各位大佬们,你们遇到过这种问题吗?

我也是,重装了nvm,node,vue等还是不行

@joker-ssh
Copy link

image
我同上

@jasonchrion
Copy link

问题解决了,是git版本的问题,重新安装非release版本2.20即可

@Wpcc
Copy link

Wpcc commented Dec 27, 2018

image
我同上

我也遇到这个问题,虽然我配置了全局的淘宝镜像,不过还是按照作者的配置项重新安装了下,然后就莫名其妙的好了。npm install --registry=https://registry.npm.taobao.org

命令行显示如下语句后,开始正确地下载包了:

$ npm install --registry=https://registry.npm.taobao.org
npm WARN deprecated bfj-node4@5.3.1: Switch to the `bfj` package for fixes and n                                       ew features!
npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@n                                       pmjs.com for more info.
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, fl                                       atted is its successor.

> husky@0.14.3 install C:\Users\Administrator\Desktop\后台管理\vue-element-admin                                       \node_modules\husky
> node ./bin/install.js

husky
setting up Git hooks
done

@as8982398
Copy link

问题解决了,是git版本的问题,重新安装非release版本2.20即可

大佬,能给个链接吗?我试过装好多个版本的git,都不行啊。。

@as8982398
Copy link

image
我同上

问题解决了吗?怎么解决的呢?

@TonyCMCC
Copy link

安装失败的原因是node-sass下载的地址不对,
正确的地址是在这个目录下:https://github.com/sass/node-sass/releases
而非https://github.com/sass/node-sass/releases/download/v4.11.0/win32-x64-59_binding.node
但是如果不翻墙还是很难下载下来。

安装时指定镜像源
npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass

@surest-sky
Copy link

y

image
我同上

问题解决了吗?怎么解决的呢?

同上,依旧没有解决这个问题

@ZDSDESIRE
Copy link

image
问题同求大神解答~~~

@ZDSDESIRE
Copy link

image
问题同求大神解答~~~

好吧,应该是git版本的问题,原git最新版2.20.1,卸载后再安装2.20.0版本再重新install就可以了

@TonyCMCC
Copy link

y

image
我同上

问题解决了吗?怎么解决的呢?

同上,依旧没有解决这个问题

npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass
这样安装

@rui8832
Copy link

rui8832 commented Feb 15, 2019

下载项目的时候run install时,node-sass下载失败后来我在项目根目录下添加了一个.npmrc

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=https://registry.npm.taobao.org

把node-sass的路径修改成淘宝的npm,就很顺利的可以在国内的网络环境下载了

参照上面方案,已经解决问题,我是通过 npm config edit 命令进行配置。

@PanJiaChen PanJiaChen pinned this issue Feb 15, 2019
@mahaoming
Copy link

下载项目的时候run install时,node-sass下载失败后来我在项目根目录下添加了一个.npmrc

sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
registry=https://registry.npm.taobao.org

把node-sass的路径修改成淘宝的npm,就很顺利的可以在国内的网络环境下载了

参照上面方案,已经解决问题,我是通过 npm config edit 命令进行配置。

配置了.npmrc之后还是不行,在npm config edit 要怎么配置的

@CharlesLzo
Copy link

圈友们大家好,我也遇到了这个问题,我参考了大家上面提出的解决办法,发现这个是可以的:

首先,执行git update-git-for-windows 更新一下git版本。
然后,运行npm install --registry=https://registry.npm.taobao.org

我的就好了。

@q287806325
Copy link

q287806325 commented Feb 25, 2019

如果提示error setting certificate verify locations,
就执行下面这个命令
git config --system http.sslverify false

@supervate
Copy link

建议也可以试试 在安装项目依赖的时候
npm install --sass_binary_site=https://npm.taobao.org/mirrors/node-sass

@1129269131
Copy link

我网上找到一个解决办法
1、npm install --registry=https://registry.npm.taobao.org
2、npm install -g cnpm --registry=https://registry.npm.taobao.org (如果有cnpm的话可省略此步)
3、cnpm install node-sass

@redleaves1
Copy link

image 有大佬遇到这种错误吗?怎么解决这种报错

我安装了VS2019,安装时勾选包含c++的桌面开发选项,然后再运行 npm config set msvs_version 2019就成功了

@528625
Copy link

528625 commented Apr 15, 2022

我也遇到了,我的node是16 node-sass是7 npm是8
用npx -p npm@6 npm install --registry=https://registry.npm.taobao.org
然后npm run dev报错:
Node Sass version 7.0.1 is incompatible with ^4.0.0.
at getRenderFuncFromSassImpl
解决办法是:
高版本的node已经弃用node-sass改用sass
1.卸载node-sass:
npm uninstall node-sass
2.安装sass:
npm install sass@1.26.5 --save-dev
3.安装sass-load
npm install sass-loader@7.3.1
4.编译安装 或者删除node_modules文件夹编译安装
npm install
5.运行项目
npm run dev

@porschelo
Copy link

截圖 2022-04-28 下午12 22 54

求助各位大佬,我求助各位大佬,我在的地區不用翻牆啊,為什麼爆這個錯呀? 有沒有解法呢

@porschelo
Copy link

截圖 2022-04-28 下午12 22 54

求助各位大佬,我求助各位大佬,我在的地區不用翻牆啊,為什麼爆這個錯呀? 有沒有解法呢

經過一早上的研究,
先輸入下面:
git config --global url."https://github.com/".insteadOf git://github.com/
後在npm install就成功了,
詳細可以去這邊看。

@2560214456
Copy link

image

@2560214456
Copy link

image
这是什么原因啊

@HackyleShawe
Copy link

试过上面方法还不行的同学 ,可以把package.json中的node-scss依赖改为:"node-sass": "^4.5.0",

朋友,你好。请问你的NodeJS版本是多少呀?

@randy-wangg
Copy link

一直下载报错
gyp info it worked if it ends with ok
gyp verb cli [
gyp verb cli 'C:\Program Files\nodejs\node.exe',
gyp verb cli 'D:\gs\lpg.gov.front\node_modules\_node-gyp@3.8.0@node-gyp\bin\node-gyp.js',
gyp verb cli 'rebuild',
gyp verb cli '--verbose',
gyp verb cli '--libsass_ext=',
gyp verb cli '--libsass_cflags=',
gyp verb cli '--libsass_ldflags=',
gyp verb cli '--libsass_library='
gyp verb cli ]
gyp info using node-gyp@3.8.0
gyp info using node@14.17.5 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb download using dist-url https://npmmirror.com/mirrors/node
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb which failed Error: not found: python2
gyp verb which failed at getNotFoundError (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:13:12)
gyp verb which failed at F (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:68:19)
gyp verb which failed at E (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:80:29)
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:89:16
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\index.js:42:5
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\windows.js:36:5
gyp verb which failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb which failed python2 Error: not found: python2
gyp verb which failed at getNotFoundError (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:13:12)
gyp verb which failed at F (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:68:19)
gyp verb which failed at E (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:80:29)
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:89:16
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\index.js:42:5
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\windows.js:36:5
gyp verb which failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb which failed code: 'ENOENT'
gyp verb which failed }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb which failed Error: not found: python
gyp verb which failed at getNotFoundError (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:13:12)
gyp verb which failed at F (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:68:19)
gyp verb which failed at E (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:80:29)
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:89:16
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\index.js:42:5
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\windows.js:36:5
gyp verb which failed at FSReqCallback.oncomplete (fs.js:192:21)
gyp verb which failed python Error: not found: python
gyp verb which failed at getNotFoundError (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:13:12)
gyp verb which failed at F (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:68:19)
gyp verb which failed at E (D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:80:29)
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_which@1.3.1@which\which.js:89:16
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\index.js:42:5
gyp verb which failed at D:\gs\lpg.gov.front\node_modules_isexe@2.0.0@isexe\windows.js:36:5
gyp verb which failed at FSReqCallback.oncomplete (fs.js:192:21) {
gyp verb which failed code: 'ENOENT'
gyp verb which failed }
gyp verb could not find "python". checking python launcher
gyp verb could not find "python". guessing location
gyp verb ensuring that file exists: C:\Python27\python.exe
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
gyp ERR! stack at PythonFinder.failNoPython (D:\gs\lpg.gov.front\node_modules_node-gyp@3.8.0@node-gyp\lib\configure.js:484:19)
gyp ERR! stack at PythonFinder. (D:\gs\lpg.gov.front\node_modules_node-gyp@3.8.0@node-gyp\lib\configure.js:509:16)
gyp ERR! stack at callback (D:\gs\lpg.gov.front\node_modules_graceful-fs@4.2.10@graceful-fs\polyfills.js:306:20)
gyp ERR! stack at FSReqCallback.oncomplete (fs.js:192:21)
gyp ERR! System Windows_NT 10.0.22000
gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\gs\lpg.gov.front\node_modules\_node-gyp@3.8.0@node-gyp\bin\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd D:\gs\lpg.gov.front\node_modules_node-sass@4.9.0@node-sass
gyp ERR! node -v v14.17.5
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
[npminstall:runscript:error] node-sass@4.9.0 scripts.postinstall run "node scripts/build.js" error: Error [RunScriptError]: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
at ChildProcess. (C:\Users\WB279\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:400:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
stdio: [Object],
exitcode: 1
}
× Install fail! RunScriptError: post install error, please remove node_modules before retry!
Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
RunScriptError: Run "C:\Windows\system32\cmd.exe /d /s /c node scripts/build.js" error, exit code 1
at ChildProcess. (C:\Users\WB279\AppData\Roaming\npm\node_modules\cnpm\node_modules\runscript\index.js:96:21)
at ChildProcess.emit (events.js:400:28)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
npminstall version: 6.4.0
npminstall args: C:\Program Files\nodejs\node.exe C:\Users\WB279\AppData\Roaming\npm\node_modules\cnpm\node_modules\npminstall\bin\install.js --fix-bug-versions --china --userconfig=C:\Users\WB279.cnpmrc --disturl=https://npmmirror.com/mirrors/node --registry=https://registry.npmmirror.com node-sass@4.9.0 -D

@li-lei-call
Copy link

项目 npm run dev 启动不了是怎么回事呢

@2300307776
Copy link

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@7.0.1 postinstall: node scripts/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@7.0.1 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\ljy\AppData\Roaming\npm-cache_logs\2022-08-02T05_43_11_862Z-debug.log

怎么也不好使啊

@1340423221
Copy link

1340423221 commented Sep 17, 2022

Error while executing:
npm ERR! D:\Git\cmd\git.EXE ls-remote -h -t git://github.com/adobe-webplatform/eve.git
npm ERR!
npm ERR! fatal: unable to access 'https://github.com/adobe-webplatform/eve.git/': OpenSSL SSL_read: Connection was reset, errno 10054
npm ERR!
npm ERR! exited with error code: 128

在终端使用: git config --global http.sslVerify "false"
就可以解决了

@TemplarX-boop
Copy link

4542122901be5d9a944321b16644839
3b3187bea5ab09f166f6c20003ed443
npm install 和 npm install --registry=https://registry.npm.taobao.org/都报上面的错误,蒙圈了

@asonzhu
Copy link

asonzhu commented Oct 24, 2022

在国内搞了两天搞不定,出国后,直接npm install完美运行了。。。。。。

@hong-zhanqiang
Copy link

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
Copy link

npm install node-sass --save-dev
image
两条命令都执行了,还是会报错

@ALEXMORCER87
Copy link

image
安装了python环境,但是报这个错误

@ALEXMORCER87
Copy link

项目无法启动的问题解决方案: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
Copy link

fjqken commented Feb 24, 2023

image
这个老哥的实测有用

@RaverHui
Copy link

RaverHui commented Mar 1, 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/nhn/raphael.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.

大佬 有答案了吗

@cczxsong
Copy link

cczxsong commented Apr 6, 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/nhn/raphael.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.

大佬 有答案了吗

重新设置一下ssh key就好了

@yuanbaoerer
Copy link

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
Copy link

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 有大佬知道我这里是什么问题吗?

我这里是windows
用管理员权限打开powershell并cd到目录
执行 npm cache clean --force 后再install就可以了

@iHTCboy
Copy link

iHTCboy commented Jul 25, 2023

Mac M1 ,用 v14.17.5 一直不行,最后,升级到 node v14.21.3 (npm v6.14.18) 就解决了 0.0

@sxz156178
Copy link

sxz156178 commented 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
Copy link

这边调整npm 版本为 12.13.1 就行了
可以先用 nvm 调整 nodejs 版本为 12.13.1
然后删除 node_modules 和 package-lock.json 文件
然后重新下载 npm i

@mrwangjing
Copy link

https://blog.csdn.net/zhu7478848/article/details/128642538 按照这个版本对照,查看package.json里的 "node-sass": "^4.9.0", 下载node10 版本安装,然后删除 node_modules 和 package-lock.json 文件,然后重新下载 npm i 问题解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests