Constant "resolved": false toggle

cli

(Dmitriy Likhten) #1

My package-lock.json constantly toggles between

  "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.1.tgz",
  "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' }

(Kat Marchán) #2

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.


(Dmitriy Likhten) #4

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?


(Kat Marchán) #5

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!


(Dmitriy Likhten) #6

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


(system) #7

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.