In my project, I\'m using Angular6 for the frontend. Now what I\'m trying to do is deploy my project which is in remote server into the actual server. I\'m using npm r
Delete your package-lock.json
file and node_modules
folder.
Then do npm cache clean
npm cache clean --force
do
npm install
again and run
For me, the problem was in firebase.json
, the site
name was incorrect.
I'm on Ubuntu 18.04. I fixed this problem by increasing the inotify max_user_watches using this command:
echo 65536 | sudo tee -a /proc/sys/fs/inotify/max_user_watches
For me, I was trying to install an old version of bcrypt which was not found in npm, I just edited package.json and manually put the latest version and then ran npm install
and it worked
Delete node_modules
rm -r node_modules
install packages again
npm install
Finally, I found a solution to this problem without reinstalling npm and I'm posting it because in future it will help someone, Most of the time this error occurs javascript heap went out of the memory. As the error says itself this is not a problem with npm. Only we have to do is
instead of,
npm run build -prod
extend the javascript memory by following,
node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build --prod