Home > database >  Vs code not working in my linux npm err sowing?
Vs code not working in my linux npm err sowing?

Time:07-01

protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install
[sudo] password for protons: 
npm notice 
npm notice New minor version of npm available! 8.12.1 -> 8.13.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.13.2
npm notice Run npm install -g [email protected] to update!
npm notice 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!   peer react@">=16.0.0" from @ant-design/[email protected]
npm ERR!   node_modules/@ant-design/icons
npm ERR!     @ant-design/icons@"^4.7.0" from the root project
npm ERR!   77 more (@emotion/react, @emotion/styled, @icons/material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.2.0" from [email protected]
npm ERR! node_modules/react-otp-input
npm ERR!   react-otp-input@"^2.3.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^16.2.0" from [email protected]
npm ERR!   node_modules/react-otp-input
npm ERR!     react-otp-input@"^2.3.1" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-07-01T06_16_23_962Z-debug-0.log
protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ ^C
protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ npm install -g [email protected]
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
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!     /home/protons/.npm/_logs/2022-07-01T06_20_59_076Z-debug-0.log
protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install -g [email protected]

changed 24 packages, and audited 202 packages in 4s

11 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ sudo npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/react
npm ERR!   react@"17.0.2" from the root project
npm ERR!   peer react@">=16.0.0" from @ant-design/[email protected]
npm ERR!   node_modules/@ant-design/icons
npm ERR!     @ant-design/icons@"^4.7.0" from the root project
npm ERR!   77 more (@emotion/react, @emotion/styled, @icons/material, ...)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer react@"^16.2.0" from [email protected]
npm ERR! node_modules/react-otp-input
npm ERR!   react-otp-input@"^2.3.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: [email protected]
npm ERR! node_modules/react
npm ERR!   peer react@"^16.2.0" from [email protected]
npm ERR!   node_modules/react-otp-input
npm ERR!     react-otp-input@"^2.3.1" 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 /root/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-07-01T06_22_32_536Z-debug-0.log
protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ ^C
protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$ npm fund
[email protected]

protons@protons-HP-EliteBook-840-G3:~/Desktop/NH_Facility_Portal_V0$   

enter image description here

CodePudding user response:

First delete package-lock.json and node_modules folder then run

npm install --legacy-peer-deps

or

sudo npm install --legacy-peer-deps

CodePudding user response:

try with :

npm install --legacy-peer-deps

CodePudding user response:

Run the following command.

sudo npm intall --force

  • Related