Npm Warn Saveerror Enonent During Uninstall
Nov 8, 2017I recently tried a few utility programs through npm javascript manager. For further info see Npm package manager on Wikipedia.
But after trying them, I noticed that the output compilation was not what I had expected.
Usually, or so it seems, that by default the programs end up on /usr/lib/node_modules
.
I kept one of the programs which I found it handy and very convenient. But I just wanted to remove the rest from the system.
But lo and behold. The removal outcome for the programs was not what I had expected either.
npm threw errors even with sudo privileges.
npm WARN enoent ENOENT: no such file or directory, open 'package.json'
npm WARN c No description
npm WARN c No repository field.
npm WARN c No README data
npm WARN c No license field.
The problem was easily resolved by issuing the flag -g
(get) for a successful uninstall. So that was npm uninstall <name> -g
.
Later I checked on /usr/lib/node_modules
, to make sure the program was no longer on the system.