Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Prune command adds packages? #2509

Closed
SpenceUK opened this issue Jan 19, 2021 · 1 comment
Closed

[BUG] Prune command adds packages? #2509

SpenceUK opened this issue Jan 19, 2021 · 1 comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release

Comments

@SpenceUK
Copy link

Current Behavior:

running npm prune --json shows that it is adding packages. The documentation does not explain why. It states that this command is to remove extraneous packages not listed in package json file.

My question is for an explanation as to why it is adding additional packages?
If it should not then this is a bug. If it is the correct behaviour can it be explained and also added to the prune documentation please.

Thank you.

Expected Behavior:

I would expect this command to only remove extraneous packages and to add nothing.

Steps To Reproduce:

Command and output below:

npm prune --dry-run --json

`
npm WARN bootstrap@4.5.3 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.5.3 requires a peer of popper.js@^1.16.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@6.0.0 requires a peer of eslint-plugin-import@^2.22.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-react-app@6.0.0 requires a peer of eslint-plugin-jsx-a11y@^6.3.1 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-import@2.9.0 requires a peer of eslint@2.x - 4.x but none is installed. You must install peer dependencies yourself.
npm WARN eslint-plugin-jsx-a11y@6.2.1 requires a peer of eslint@^3 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-watch@5.1.2 requires a peer of eslint@>=4 <6.0.0 but none is installed. You must install peer dependencies yourself.

{
"added": [
{
"action": "add",
"name": "babel-plugin-jest-hoist",
"version": "26.6.2",
"path": "node_modules/react-scripts/node_modules/babel-plugin-jest-hoist"
},
{
"action": "add",
"name": "babel-preset-jest",
"version": "26.6.2",
"path": "node_modules/react-scripts/node_modules/babel-preset-jest"
}
],
"removed": [],
"updated": [],
"moved": [],
"failed": [],
"warnings": [
"bootstrap@4.5.3 requires a peer of jquery@1.9.1 - 3 but none is installed. You must install peer dependencies yourself.",
"bootstrap@4.5.3 requires a peer of popper.js@^1.16.1 but none is installed. You must install peer dependencies yourself.",
"eslint-config-react-app@6.0.0 requires a peer of eslint-plugin-import@^2.22.0 but none is installed. You must install peer dependencies yourself.",
"eslint-config-react-app@6.0.0 requires a peer of eslint-plugin-jsx-a11y@^6.3.1 but none is installed. You must install peer dependencies yourself.",
"eslint-plugin-import@2.9.0 requires a peer of eslint@2.x - 4.x but none is installed. You must install peer dependencies yourself.",
"eslint-plugin-jsx-a11y@6.2.1 requires a peer of eslint@^3 || ^4 || ^5 but none is installed. You must install peer dependencies yourself.",
"eslint-watch@5.1.2 requires a peer of eslint@>=4 <6.0.0 but none is installed. You must install peer dependencies yourself."
],
"audit": {
"actions": [],
"advisories": {},
"muted": [],
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 0,
"moderate": 0,
"high": 0,
"critical": 0
},
"dependencies": 2510,
"devDependencies": 782,
"optionalDependencies": 32,
"totalDependencies": 3316
}
},
"funding": "151 packages are looking for funding",
"elapsed": 10742
}
`

Environment:

  • OS: Macbook Pro Big Sur v11.1
    npm: '6.13.4',
    ares: '1.15.0',
    brotli: '1.0.7',
    cldr: '35.1',
    http_parser: '2.8.0',
    icu: '64.2',
    llhttp: '2.0.1',
    modules: '72',
    napi: '5',
    nghttp2: '1.40.0',
    node: '12.14.1',
    openssl: '1.1.1d',
    tz: '2019c',
    unicode: '12.1',
    uv: '1.33.1',
    v8: '7.7.299.13-node.16',
    zlib: '1.2.11'
    -->
@SpenceUK SpenceUK added Bug thing that needs fixing Needs Triage needs review for next steps Release 6.x work is associated with a specific npm 6 release labels Jan 19, 2021
@darcyclarke darcyclarke removed the Needs Triage needs review for next steps label Feb 13, 2021
@darcyclarke
Copy link
Contributor

npm v6 is no longer in active development; We will continue to push security releases to v6 at our team's discretion as-per our Support Policy.

If your bug is preproducible on v7, please re-file this issue using our new issue template.

If your issue was a feature request, please consider opening a new RRFC or RFC. If your issue was a question or other idea that was not CLI-specific, consider opening a discussion on our feedback repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing Release 6.x work is associated with a specific npm 6 release
Projects
None yet
Development

No branches or pull requests

2 participants