Install nest js cli

Viewed 19

The installation does not work. Why? I have node v.16.17.0 and Windows 10. Please, help me.. :)

PS C:> npm install -g @nestjs/cli
npm ERR! code EPERM npm ERR! syscall mkdir npm ERR! path C:\Program Files\nodejs\node_modules@nestjs npm ERR! errno -4048 npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules@nestjs'
npm ERR! [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules@nestjs'] { npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'mkdir', npm ERR! path: 'C:\Program Files\nodejs\node_modules\@nestjs' 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\rober\AppData\Local\npm-cache_logs\2022-09-20T19_56_27_828Z-debug-0.log

1 Answers

You can try these command that helps to resolve the error during the next js installation steps:

  1. npm cache clean --force
  2. npm install -g npm@latest --force
  3. rm -rf node_modules && rm ./package-lock.json && npm install Try to install your component once again.
Related