首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法安装和卸载NPM软件包

无法安装和卸载NPM软件包
EN

Stack Overflow用户
提问于 2022-10-10 04:24:27
回答 1查看 69关注 0票数 0

下面是我尝试安装/卸载软件包后得到的信息:

代码语言:javascript
复制
(base) vivekrk@Viveks-MacBook-Air PUPA % npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: react-navigation-drawer@1.4.0
npm ERR! Found: react-native-screens@3.18.0
npm ERR! node_modules/react-native-screens
npm ERR!   react-native-screens@"^3.18.0" from the root project
npm ERR!   peer react-native-screens@">= 3.0.0" from @react-navigation/native-stack@6.9.0
npm ERR!   node_modules/@react-navigation/native-stack
npm ERR!     @react-navigation/native-stack@"^6.9.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react-native-screens@"^1.0.0 || ^1.0.0-alpha" from react-navigation-drawer@1.4.0
npm ERR! node_modules/react-navigation-drawer
npm ERR!   react-navigation-drawer@"^1.4.0" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: react-native-screens@1.0.0-alpha.23
npm ERR! node_modules/react-native-screens
npm ERR!   peer react-native-screens@"^1.0.0 || ^1.0.0-alpha" from react-navigation-drawer@1.4.0
npm ERR!   node_modules/react-navigation-drawer
npm ERR!     react-navigation-drawer@"^1.4.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/vivekrk/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/vivekrk/.npm/_logs/2022-10-10T04_17_37_997Z-debug-0.log

而且我无法运行npx react-native start

这是发生后,我安装了几个npm软件包,并没有用,所以我卸载。但在那之后,我无法安装新的软件包。

请解决我的问题!!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-10 04:38:40

也许您有依赖冲突,所以您可以尝试使用--force运行它。

全员指挥:

npm install --force

或者您可以尝试降级您的nodejs版本。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/74010196

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档