NPM stuck on idealTree: timing idealTree

Viewed 15495

Today i decided to start react native cli project. Everything works great since i want to add new lib of course using npm . So i ran npm install ... . And this command always stuck on Image

idealTree: timing idealTree Completed in 3440ms

And nothing happened. So i tried to ran

npm install --verbose

And again stuck on the same place. Also clear cache npm cache clear --force and nothing happened again. I don'n know how to fix this

7 Answers

I have had npm install freeze on me numerous times, lately. I'm not sure of the cause. When that happens I follow these steps:

  1. Kill the npm install process with ctrl+c.
  2. Delete node_modules. If there are files that you cannot delete because they are currently in use, that may mean that the npm install process was not successfully stopped. Try opening Task Manager and ending all nodejs and terminal processes. If this fails, restart your pc and then delete node_modules
  3. Clean cache and reinstall node_modules with npm cache clean --force && npm i

This has happened to me a few times before and all I had to do was kill my dev server before running npm install.

Hope that helps as well!

When i opened my package.json i saw '~2.2.1' in front of react-native-gesture-handler which probably means that it was notinstalled properly Just close all terminals and then open task manager and kill all the processes corresponding to NodeJS. Then install it again. Hopefully it will resolve.

For me, the issue was that I had node running for a separate project. Terminating the other node process fixed the issue.

I also faced this problem and the solution was simple by stopping all the "nodejs terminals" that are working outside. When you stop nodeJS Terminals running in the background, it will complete the current installation process. enter image description here

When you want to add package on your project it is better to stop server before adding new package. I had same problem but after doing this it is solved.

I had the same issue on node latest version v18.8.0 and npm v8.18.0, I just downgraded to node 16.6 using nvm and it worked fine.

Related