The npm community forum has been discontinued.
To discuss usage of npm, visit the GitHub Support Community.
Unhandled rejection Error: Argument #2: Expected string but got null
I am suddenly getting this whenever I want to install anything, like npm install.
0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘install’ ] 2 info using firstname.lastname@example.org 3 info using email@example.com 4 verbose npm-session b078ec810e07dc1b 5 silly install runPreinstallTopLevelLifecycles 6 silly install loadCurrentTree 7 silly install readLocalPackageData 8 timing npm Completed in 3035ms 9 error cb() never called! 10 error This is an error with npm itself. Please report this error at: 11 error <https://npm.community>
Here’s what I have already tried that didn’t solve the issue:
sudo npm cache clean --force
npm cache clean --force
updating to node 8 and then node 10
uninstalling and then re-installing node
npm uninstall -g npm-check-updates
brew install node
It seems that when I ran the npm uninstall it did not actually remove all files. I manually removed all node-modules from my root directory and then reinstalled npm and now it works.