GSYGithubAPP icon indicating copy to clipboard operation
GSYGithubAPP copied to clipboard

npm install的时候报错,求教

Open semnyqu opened this issue 5 years ago • 9 comments

npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/react-native npm ERR! react-native@"0.61.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer react-native@">=0.57 <0.60" from @react-native-community/[email protected] npm ERR! node_modules/@react-native-community/netinfo npm ERR! @react-native-community/netinfo@"^2.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /Users/semny/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in: npm ERR! /Users/semny/.npm/_logs/2021-04-28T07_21_03_769Z-debug.log

semnyqu avatar Apr 28 '21 08:04 semnyqu

用 yarn ,配置版本如下图 image

CarGuo avatar Apr 29 '21 02:04 CarGuo

用 yarn ,配置版本如下图 image

hi CarGuo, 非常感谢你的回复,我的操作及环境信息如下: 本地环境如下: npm版本:npm -v 7.11.1 node版本:node -v v13.13.0

使用yarn来安装对应的第三方库,使用命令如下yarn install --no-lockfile;提示信息如下 image

难道以上问题和环境版本有关吗?

semnyqu avatar May 07 '21 08:05 semnyqu

$ npm -v 6.14.4 $ node -v v10.13.0

CarGuo avatar May 07 '21 08:05 CarGuo

$ npm -v 6.14.4 $ node -v v10.13.0

指定了安装版本brew link --overwrite --force node@10 node -v v10.24.0 npm -v 6.14.11 但是执行yarn install 还是出现这个错误 image

semnyqu avatar May 07 '21 08:05 semnyqu

$ npm -v 6.14.4 $ node -v v10.13.0

初步感觉还是这个库拉不下来,https://github.com/CarSmallGuo/react-native-version-number.git 其他库都正常,只有这个不行

semnyqu avatar May 07 '21 09:05 semnyqu

这个在 github 上呀~不大可能拉不下来,除非网络访问有问题~

CarGuo avatar May 07 '21 09:05 CarGuo

这个在 github 上呀~不大可能拉不下来,除非网络访问有问题~ NPM网站的路径 image 配置文件里的路径 image git clone 下载 image

有点奇怪,感觉这里的配置有点问题

semnyqu avatar May 07 '21 10:05 semnyqu

这个没问题的

CarGuo avatar May 07 '21 10:05 CarGuo

443错误说明你命令行访问github出现异常

CarGuo avatar May 07 '21 10:05 CarGuo