Search code examples
node.jsnpmnpm-shrinkwrap

npm errror while installing package in new machine


I Want to install package from ShrinkWrap.json file , I am trying to install package in new machine but command npm install is throwing error

npm WARN tar ENOENT: no such file or directory, open '/build/Source/Web/node_modules/.staging/whet.extend-0ac707ec/package.json

Expected Behavior : I want the package to be installed correctly

What I tried so far : Removed node_modules folder and deleted package-lock.json file and npm cache clean --force as well

Details Node version : 10.17.0

Note : I want to install the package from shrinkwrap.json file only


Solution

  • When using npm shrinkwrap, you need the package.json file in addition to the npm-shrinkwrap.json file. The error says it can't find the package.json file.