Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
240 views
in Technique[技术] by (71.8m points)

node.js - Error while install package react-typed and others

  • I tried to install package for my react and this error appear. And when i tried to install other package like "npm install react-particles-js" I also got the same error.
$ npm install react-typed
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
npm ERR!   react@"^17.0.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.3.0" from [email protected]
npm ERR! node_modules/react-typed
npm ERR!   react-typed@"*" 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 C:Users
ushaAppDataLocal
pm-cacheeresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR!     C:Users
ushaAppDataLocal
pm-cache\_logs2021-01-23T17_43_17_669Z-debug.log
  • I also tried with "npm install react-typed --legacy-peer-deps" and still got an error
$ npm install react-typed --legacy-peer-deps
npm ERR! code EPERM
npm ERR! syscall rename
npm ERR! path D:Fullstack CilsyCodecreate-reactportfolio-project1
ode_modulesjquery
npm ERR! dest D:Fullstack CilsyCodecreate-reactportfolio-project1
ode_modules.jquery-nnI3d113
npm ERR! errno -4048
npm ERR! Error: EPERM: operation not permitted, rename 'D:Fullstack CilsyCodecreate-reactportfolio-project1
ode_modulesjquery' -> 'D:Fullstack CilsyCodecreate-reactportfolio-project1
ode_modules.jquery-nnI3d113'
npm ERR!  [Error: EPERM: operation not permitted, rename 'D:Fullstack CilsyCodecreate-reactportfolio-project1
ode_modulesjquery' -> 'D:Fullstack CilsyCodecreate-reactportfolio-project1
ode_modules.jquery-nnI3d113'] {
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'rename',
npm ERR!   path: 'D:\Fullstack Cilsy\Code\create-react\portfolio-project1\node_modules\jquery',
npm ERR!   dest: 'D:\Fullstack Cilsy\Code\create-react\portfolio-project1\node_modules\.jquery-nnI3d113'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:Users
ushaAppDataLocal
pm-cache\_logs2021-01-23T16_35_50_683Z-debug.log
question from:https://stackoverflow.com/questions/65862552/error-while-install-package-react-typed-and-others

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Solved

After I delete folder node_modules and file package-lock.json in my react project. I tried to "npm install" and add --legacy-peer-deps "npm install react-typed --legacy-peer-deps"

I don't know why before delete node_module and package-lock.json I can't run with --legacy-peer-deps


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...