Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm install changes resolved from a URL to false

The Problem

When I pull my team's code and run npm install a number of items in package-lock.json have their resolved property change from a URL to false. E.g.

"debug": {
  "version": "3.2.6",
  "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
  …
},

// changes to 

"debug": {
  "version": "3.2.6",
  "resolved": false,
  …
},

The Ask

I would like this not to happen. I don't understand why it is happening or what could be causing it. It seems like a pretty odd and serious bug. What would happen if I checked this in and deployed? 🤷‍♂️

The Details

npm -v #=> 6.14.5

node -v #=> v12.13.0

like image 723
Aaron Avatar asked May 25 '20 22:05

Aaron


1 Answers

Solution

As @bryan60 has pointed out this is a bug in NPM, specifically with npm link. There's nothing we can do at this point except wait for the update.

Work Around

If you are having problem and have a few minutes rm -rf node_modules/ && npm install will reinstall all of your node modules and you won't have the package-lock.json problem.

like image 102
Aaron Avatar answered Nov 10 '22 17:11

Aaron