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] on version 12.14, npm prune fails in Jenkins jobs #620

Closed
dotanrs opened this issue Dec 19, 2019 · 3 comments
Closed

[BUG] on version 12.14, npm prune fails in Jenkins jobs #620

dotanrs opened this issue Dec 19, 2019 · 3 comments
Labels
Bug thing that needs fixing

Comments

@dotanrs
Copy link

dotanrs commented Dec 19, 2019

What

Since updating to 12.14.0 (from 12.13.1) in Jenkins, npm prune commands fail with

npm ERR! Maximum call stack size exceeded

When

Since upgrading node version, whenever a build in Jeknins reaches the npm prune command I get this error.

If I skip prune, npm install works fine.
If I delete my package-lock.json file, npm prune works fine as well

I tried recreating package-lock so that all the versions were created by npm 12.14, it didn't work.

How

Current Behavior

Complete log from Jenkins:

+ npm prune
npm WARN citadel@1.0.0 No description
npm WARN citadel@1.0.0 No repository field.
npm WARN citadel@1.0.0 No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.8 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.8: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! Maximum call stack size exceeded

npm ERR! A complete log of this run can be found in:
npm ERR! /var/lib/jenkins/.npm/_logs/2019-12-19T15_43_05_356Z-debug.log

Steps to Reproduce

Set Jenkins node version to 12.14, run a build on a nodejs project that does npm prune.

Expected Behavior

Prune should do prune and succeed

Who

+ node -v
v12.14.0
+ npm -v
6.13.4

@dargue3
Copy link

dargue3 commented Dec 20, 2019

The last time one of my builds succeeded it was using npm v6.13.1. Now my CI is pinned to npm v6.13.4 and it's consistently failing for maximum call stack size exceeded.

Tried running with npm cache clean and that didn't help. Confirmed it does work locally when using v6.13.4

--> Checking installed npm version...
        INFO: Running command: "npm --version"...
        INFO: Command "npm --version" took 0s
        --> Using current npm version (6.13.4)
        --> Installing utilities...
        <-- Done.
        --> Pruning dependencies...
        INFO: Running command: "npm prune --unsafe-perm"...
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/chokidar/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/jest-haste-map/node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules/fsevents):
        npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
        
        npm ERR! Maximum call stack size exceeded

@dargue3
Copy link

dargue3 commented Dec 20, 2019

For now, if anyone is interested, I've fixed by pinning my node versions using a package.json with the following. You could pin it to whatever version you like. Note: this may not be applicable in your CI, you should read you own docs to find out

{
  "engines": {
    "node": "12.0.0",
    "npm": "6.9.0"
  },
}

@darcyclarke darcyclarke added the Bug thing that needs fixing label Oct 30, 2020
@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

Closing: This is an automated message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug thing that needs fixing
Projects
None yet
Development

No branches or pull requests

3 participants