I am using reactjs and am unable to install any packages using npm install
. The error message I\'m getting is :
npm ERR! Cannot read property \'reso
I got into this situation with an old version of the n
node version switcher (~v2), having switched onto Node v12. I was able to fix it by switching to a much older version of Node it had installed using n
, v8 worked for me, and then upgrade the version switcher with sudo npm install -g n
.
From there I could switch to any version of node and use npm again.