Unhandled rejection Error: Argument #2: Expected string but got null


(Kristen) #1

I am suddenly getting this whenever I want to install anything, like npm install.
Log:
0 info it worked if it ends with ok 1 verbose cli [ ‘/usr/local/bin/node’, ‘/usr/local/bin/npm’, ‘install’ ] 2 info using npm@6.4.1 3 info using node@v10.12.0 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


(Kristen) #2

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.


(system) #3

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.