Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM install gives error fatal: reference is not a tree

I am trying to build my JavaScript files with Grunt. but when I run npm install, it shows me error message "fatal: reference is not a tree:cef34f39dcfwe(commit Id i guess).

Anyone has idea?

Thanks

like image 385
Miodrag Avatar asked Oct 11 '25 22:10

Miodrag


2 Answers

Remove package-lock.json and run npm install
if it didn't work try this:

npm update then npm install

like image 180
Saman Mohamadi Avatar answered Oct 14 '25 11:10

Saman Mohamadi


Delete all references to that package from node module for which you are getting this issue then try clearing node modules by using

npm cache clear --force

then use

npm install
like image 31
Arun Kasyakar Avatar answered Oct 14 '25 11:10

Arun Kasyakar