Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Problems to install NestJS

I want to install NestJS with the npm i -g @nestjs/cli command.

npm ERR! code ENOTEMPTY npm ERR! syscall rename npm ERR! path
/usr/local/lib/node_modules/@nestjs/cli npm ERR! dest
/usr/local/lib/node_modules/@nestjs/.cli-seuz8ewr npm ERR! errno -39
npm ERR! ENOTEMPTY: directory not empty, rename
‘/usr/local/lib/node_modules/@nestjs/cli’ ->
‘/usr/local/lib/node_modules/@nestjs/.cli-seuz8ewr’

npm ERR! A complete log of this run can be found in: npm ERR!
/root/.npm/_logs/2023-02-18T21_30_24_672Z-debug-0.log

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

I tried to remove the "node_modules" and renaming the ../cli to /.cli-seuz8ewr and after that it gets killed with:

Killed####⠂⠂⠂⠂⠂⠂⠂⠂⠂) ⠴ reify:fsevents: sill reify mark deleted [ ‘/usr/local/lib/node_modules/@nestjs/cli/node_modules/fseven

What could be the problem?

>Solution :

Welcome to StackOverflow.

The error message you received suggests that there may be a problem with the directory permissions or ownership for the "@nestjs/cli" package. Here are some steps you can try to resolve the issue:

  1. Open a terminal and run the command sudo npm uninstall -g @nestjs/cli to uninstall the@nestjs/cli package.

  2. Check the ownership of the /usr/local/lib/node_modules directory by running the command ls -la /usr/local/lib/. Make sure that the owner of the directory is the current user.

  3. If the ownership of the directory is not correct, you can change it by running sudo chown -R $(whoami) /usr/local/lib/node_modules.

  4. Once the ownership is correct, try npm cache clean --force to clear the npm cache.

  5. Finally, run npm i -g @nestjs/cli to reinstall the "@nestjs/cli" package.

If the problem persists, you may need to investigate further and possibly seek assistance from the NestJS community or npm support.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading