, 1 min read
npm error: must provide string spec
I tried to install some npm packets with npm install
. This failed with error
npm install npm ERR! must provide string spec
Looking into the source of the error in the entire npm
under /lib/node_modules/npm
:
node_modules/@npmcli/arborist/lib/edge.js
51: throw new TypeError('must provide string spec')
did not provide any hint what the actual error was. Lots of googling hinted at deleting files and directories.
Solution is as follows. In my home-directory:
- Deleted
node_modules
directory - Deleted files
package.json
andpackage-lock.json