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 installed Node sometime ago (approximately 1 year ago) and npm worked properly. The node version was 10.15.3. After the install and having written a few small apps - I did not work with Node again until today. Trying to install express with npm - I got the error of: "npm ERR! Cannot read property 'resolve' of undefined" even though it had worked previously. Noting that the Node version was old, I uninstalled and installed the latest version. In my case, I installed into the c:\NodeJs folder (where it was installed previously). This made no difference - I got the same error. I then uninstalled and re-installed into the default folder of c:\Program Files\nodejs and npm works again. Hopefully this might help someone else