npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Constant "resolved": false toggle

My package-lock.json constantly toggles between

  "resolved": "",
  "resolved": false,

Which affects multiple packages. My co-worker and I have the same version of npm and node, and yet when he commits, the resolved line is the url, when I commit it is false. I cannot figure out why we have differences.

 npm version
{ honeycomb: '0.1.35',
  npm: '6.1.0',
  ares: '1.13.0',
  cldr: '33.0',
  http_parser: '2.8.0',
  icu: '61.1',
  modules: '59',
  napi: '3',
  nghttp2: '1.29.0',
  node: '9.11.1',
  openssl: '1.0.2o',
  tz: '2018c',
  unicode: '10.0',
  uv: '1.19.2',
  v8: '6.2.414.46-node.23',
  zlib: '1.2.11' }

One thing that might help debug this is to remove BOTH pkglock and node_modules and -then- do an install. I’m not sure why resolved would’ve disappeared like that: are you using a non standard registry?

Does it happen if you do the above deletions -and- npm install --cache /tmp/fresh-cache?

It’s important to remove both because the metadata stored in node_modules is also used to regenerate lockfiles and vice versa.

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Seems to be related to when I do npm link with a locally installed copy of a module I have. Is there a cleanup phase for npm link?

I think until npm@7 comes out, you should consider npm link to be pretty much broken, with “proceed at your own risk” written all over it. It requires a significant overhaul in order to fix, and we’re working on speccing out the new functionality right now!

I appreciate the info. Thank you! I’ll have to tread with caution.