billyjanitsch
Repos
26
Followers
52
Following
3

🐬 personal website on the world wide web

0
0

Events

Created at 1 month ago
billyjanitsch create branch deps
Created at 2 months ago
Created at 2 months ago
opened issue
[BUG] `npm install` installs an invalid tree (as validated by `npm ci`)

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

See the two commits in this repo.

The first commit is the result of running:

> npm install @pmmmwh/react-refresh-webpack-plugin@0.5.9 read-pkg-up@7.0.1
added 135 packages in 6s

This command exits without error, and correctly installs to node_modules/ and package-lock.json. However, the resulting tree is invalid, according to npm ci:

❯ npm ci
npm ERR! code EUSAGE
npm ERR! 
npm ERR! `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.

The second commit is the result of running npm install again. This updates the package lock to a valid tree, and npm ci now completes successfully.

Expected Behavior

It shouldn't be necessary to run npm install twice to get a valid tree.

Steps To Reproduce

See current behavior for a minimal repro repository.

Environment

  • npm: 9.1.1
  • Node.js: 18.12.0
  • OS Name: macOS
  • System Model Name: MacBook Pro (16-inch, 2019)
  • npm config: none
Created at 2 months ago
billyjanitsch create branch main
Created at 2 months ago
create repository
billyjanitsch create repository
Created at 2 months ago
opened issue
[BUG] `npm view <pkg>@<spec>` prints info for every matching version

Is there an existing issue for this?

  • [X] I have searched the existing issues

This issue exists in the latest npm version

  • [X] I am using the latest npm

Current Behavior

npm view <pkg>@<spec> prints the package information for every matching version of that package.

Expected Behavior

I expect it to print the package information for only a single version (the resolution of the spec, as with npm install <pkg>@<spec>). This was the behavior in npm@8. I don't see this mentioned as an intentional change in the changelog, so it seems like a regression.

Steps To Reproduce

  1. Install npm@9.
  2. Run npm view react@18.
  3. Notice that there are multiple outputs (at time of writing, for react@18.0.0, react@18.1.0, and react@18.2.0).
  4. Install npm@8.
  5. Run npm view react@18.
  6. Notice that there is only one output (for react@18.2.0).

Environment

  • npm: 9.0.1
  • Node.js: 18.12.0
  • OS Name: macOS
  • System Model Name: MacBook Pro
  • npm config:
; n/a
Created at 2 months ago
billyjanitsch delete branch billy/node-18
Created at 2 months ago

Default to Node 18 target in library envs (#122)

Created at 2 months ago
pull request closed
Default to Node 18 target in library envs
Created at 2 months ago
pull request opened
Default to Node 18 target in library envs
Created at 2 months ago
billyjanitsch create branch billy/node-18
Created at 2 months ago