I am getting this error while running sudo npm install. On my server, npm was installed earlier. I\'ve tried to delete the package-lock.json file,
sudo npm install
package-lock.json
Before i was running this command
npm install typescript -g
after changing the command it worked perfectly.
npm install -g typescript