Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

"npm i" sets the "version" field of installed node_modules to the dist link instead of the version number. #17468

Open
2 of 13 tasks
VamshiKrishnaAlladi opened this issue Jun 27, 2017 · 7 comments

Comments

@VamshiKrishnaAlladi
Copy link

VamshiKrishnaAlladi commented Jun 27, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • Other (see below for feature requests):

What's going wrong?

With npm@5.0.3, when I install a package, the version number field in the package.json has the link to npm registry instead of the actual version number.

Is this by design? or is something going wrong here?

If it is by design, isn't the field name misleading?

How can the CLI team reproduce the problem?

By installing any package.

supporting information:

  • npm -v prints: 5.0.3
  • node -v prints: 8.1.1
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Win10
  • Network issues:
    • Geographic location where npm was run:
    • I use a proxy to connect to the npm registry.
    • I use a proxy to connect to the web.
    • I use a proxy when downloading Git repos.
    • I access the npm registry via a VPN
    • I don't use a proxy, but have limited or unreliable internet access.
  • Container:
    • I develop using Vagrant on Windows.
    • I develop using Vagrant on OS X or Linux.
    • I develop / deploy using Docker.
    • I deploy to a PaaS (Triton, Heroku).
@VamshiKrishnaAlladi
Copy link
Author

Any update on this?

@VamshiKrishnaAlladi
Copy link
Author

Is anyone looking into it? All my CI builds are failing.

@VamshiKrishnaAlladi
Copy link
Author

Is anyone even looking into this? All I see here are tumble weeds. 😢

@VamshiKrishnaAlladi VamshiKrishnaAlladi changed the title "npm i" sets the version of installed node_modules to the dist link instead of the version number. "npm i" sets the "version" field of installed node_modules to the dist link instead of the version number. Jul 28, 2017
@zkat
Copy link
Contributor

zkat commented Jul 28, 2017

Is this still happening in the latest npm? (5.3.0)

@VamshiKrishnaAlladi
Copy link
Author

VamshiKrishnaAlladi commented Jul 29, 2017

Yeah. I've just verified it's happening in 5.3.0 as well.
image

The above screenshot is of one of the node_module's package.json.

The version field here has a link and the Circle CI builds fails at a sem-ver check saying "invalid field value for version". My local builds run normally though.

@zkat
Copy link
Contributor

zkat commented Jul 29, 2017

@VamshiKrishnaAlladi I really wonder how to repro this. I wonder if you just have old results cached or something. This is probably the root cause of #17858, too.

@VamshiKrishnaAlladi
Copy link
Author

@zkat You do not see this when you install a module?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants