Last night I tried to update my node and npm, it seemed to have been successful, however ever since then I have been getting this same error any time I try and run any npm c
If the user does not have sudo rights in a unix environment, remember the user name you want to issue the command with (-> USER). Then use
su
Enter your root password. Then
chown -R USER:USER .config
Other .config folders that were created using root are also changed. In my case changing ~/.config/nvw
s owner did the job (chown -R THE USER YOU USE NPM WITH:THE USER YOU USE NPM WITH .config/nvm
)
I have similar error after node updating so i just delete directory .config and this help.
run script to check for update
sudo npm install -g npm-check-updates
and later update using sudo npm
If your are on macOS, you must update the config file. You just have to enter this command in your terminal:
sudo npm i -g npm
I got a Windows 10 environment:
For me, first I did make sure all node.exe instances killed:
taskkill /t /f /im node.exe
Then I've updated npm to the latest version using npm-check-updates
Finally, I deleted .config
folder from user home C:\Users\<USERNAME>
That's solved my problem.
worked for me after running below command
nvm use --delete-prefix version