[Vuejs]-Missing packages after cleaning node_modules

1👍

when you remove package-lock.json, you remove references about which specific versions of each package were installed before. My guess is that there was an issue published within the css-loader module, which seems to be a dependency of a dependency of Laravel.

The easiest fix would be bringing back package-lock.json, removing node_modules again and reinstalling with npm install.

1👍

There are few things you can try based on the information you have provided. You can try npm cache clean or npm cache clean –f (this is a force, which will ask you if you know what you are doing, you can proceed with the force). Once the cache has been cleaned, you can try running npm install again. Also check your version of NodeJS and make sure that whatever packages you’re using is also supporting the version. Node -V and check and make sure that css loader supports your version of node.

1👍

After I thought it had been fixed, I got the issue again today (worst actually, this time it was an error). So I went back to package-lock.json old version and after many tries and another hours lost, it worked.

I guess this is gonna happen again and obviously I cannot do that because I will add other packages in the future. I am wondering if there is any way to add all missing packages in package.json dev dependencies? I have no idea how to identify them?

It seems like npm install ls node_modules –save was working some years ago, so I m trying to dind something like this but reading in package-lock.json maybe (am I dreaming? 🙂 )

Thanks a lot

👤Maxiss

Leave a comment