One day suddenly I couldn't do
npm install. (Correctly, an error will occur at runtime.)
$ npm install -g @aws-amplify/cli npm ERR! code ENOENT npm ERR! syscall open npm ERR! path /home/vagrant/.npm/_cacache/tmp/823188c5 npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, open '/home/vagrant/.npm/_cacache/tmp/823188c5' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent
This article describes what to do if the cache folder cannot be referenced with this errno -2.
$ unlink /home/vagrant/.npm
If you look at the coping command, you may not need to explain it, but for the time being. The npm cache destination path that was output at the time of the error was a symbolic link. I don't remember when the symbolic link was created. .. ..