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

Cannot build without getting an NPM version update issue??? #1379

Closed
KeyOnTech opened this issue Oct 24, 2020 · 9 comments
Closed

Cannot build without getting an NPM version update issue??? #1379

KeyOnTech opened this issue Oct 24, 2020 · 9 comments
Labels

Comments

@KeyOnTech
Copy link

KeyOnTech commented Oct 24, 2020

Others are having the same issue here's the case number

npm/cli#2031

@Harmelodic
Copy link

Harmelodic commented Oct 24, 2020

Likewise, getting the issue with all v15+ images.

I seem to be getting a Maximum call stack size exceeded error:
https://gitlab.com/harmelodic-group/scribbles/api/-/jobs/810274418

I made a tiny little test repo here, to display the issue: https://github.com/Harmelodic/test

Reproduce by:

$ git clone https://github.com/Harmelodic/test
$ docker build .

Temp workaround for me, until v15 is fixed:

FROM node:14

@nschonni
Copy link
Member

There is nothing this repo can do for this issue. NPM is shipped as part of Node releases and we don't bump it or change it here.
I'll leave this open to see if the next Node release addresses it with an NPM bump

@nschonni nschonni added the npm label Oct 24, 2020
@Harmelodic
Copy link

I beg to differ.

Running this locally on my machine:

test $ node -v
v15.0.1
test $ npm -v
7.0.3
test $ npm install --production --loglevel verbose
npm verb cli [
npm verb cli   '/Users/matt.smith/.nvm/versions/node/v15.0.1/bin/node',
npm verb cli   '/Users/matt.smith/.nvm/versions/node/v15.0.1/bin/npm',
npm verb cli   'install',
npm verb cli   '--production',
npm verb cli   '--loglevel',
npm verb cli   'verbose'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm timing config:load:defaults Completed in 2ms
npm timing config:load:file:/Users/matt.smith/.nvm/versions/node/v15.0.1/lib/node_modules/npm/npmrc Completed in 0ms
npm timing config:load:builtin Completed in 0ms
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:/Users/matt.smith/workspace/scribbles/test/.npmrc Completed in 0ms
npm timing config:load:project Completed in 0ms
npm timing config:load:file:/Users/matt.smith/.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:/Users/matt.smith/.nvm/versions/node/v15.0.1/etc/npmrc Completed in 1ms
npm timing config:load:global Completed in 1ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:setUserAgent Completed in 0ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 6ms
npm verb npm-session f734cdc510523943
npm timing npm:load Completed in 12ms
npm timing arborist:ctor Completed in 1ms
npm timing idealTree:init Completed in 15ms
npm timing idealTree:userRequests Completed in 0ms
npm timing idealTree:#root Completed in 0ms
npm timing idealTree:buildDeps Completed in 1ms
npm timing idealTree:fixDepFlags Completed in 0ms
npm timing idealTree Completed in 16ms
npm timing reify:loadTrees Completed in 17ms
npm timing reify:diffTrees Completed in 1ms
npm timing reify:retireShallow Completed in 0ms
npm timing reify:createSparse Completed in 0ms
npm timing reify:trashOmits Completed in 0ms
npm timing reify:loadBundles Completed in 0ms
npm timing reify:audit Completed in 0ms
npm timing reify:unpack Completed in 0ms
npm timing reify:unretire Completed in 0ms
npm timing build:queue Completed in 0ms
npm timing build:deps Completed in 0ms
npm timing build Completed in 0ms
npm timing reify:build Completed in 1ms
npm timing reify:trash Completed in 0ms
npm timing reify:save Completed in 2ms
npm timing reify Completed in 24ms

up to date in 179ms

found 0 vulnerabilities
npm timing command:install Completed in 29ms
npm verb exit 0
npm timing npm Completed in 180ms
npm info ok

However, when run through the node:15 docker image, which comes from this repo:

test $ cat Dockerfile
FROM node:15

COPY index.js index.js
COPY package.json package.json
COPY package-lock.json package-lock.json

RUN npm install --production --loglevel verbose

CMD node index.js%                                                                                                                                                                                                                                                              test $ docker build .
Sending build context to Docker daemon  61.95kB
Step 1/6 : FROM node:15
 ---> ca36fba5ad66
Step 2/6 : COPY index.js index.js
 ---> Using cache
 ---> 5dbb0eac1f9f
Step 3/6 : COPY package.json package.json
 ---> Using cache
 ---> 2f6a2f083990
Step 4/6 : COPY package-lock.json package-lock.json
 ---> 7c3a354e710b
Step 5/6 : RUN npm install --production --loglevel verbose
 ---> Running in edd9b97ff78a
npm verb cli [
npm verb cli   '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   '--production',
npm verb cli   '--loglevel',
npm verb cli   'verbose'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm timing config:load:defaults Completed in 1ms
npm timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 1ms
npm timing config:load:builtin Completed in 1ms
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 0ms
npm timing config:load:file:/.npmrc Completed in 1ms
npm timing config:load:project Completed in 2ms
npm timing config:load:file:/root/.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
npm timing config:load:global Completed in 1ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:setUserAgent Completed in 1ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 10ms
npm verb npm-session b352caf8177c47fa
npm timing npm:load Completed in 31ms
npm http fetch GET 200 https://registry.npmjs.org/npm 944ms
npm http fetch GET 304 https://registry.npmjs.org/npm 74ms (from cache)
npm timing arborist:ctor Completed in 1ms
npm timing idealTree Completed in 26ms
npm timing command:install Completed in 33ms
npm notice
npm notice New patch version of npm available! 7.0.3 -> 7.0.5
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.5>
npm notice Run `npm install -g [email protected]` to update!
npm notice
npm verb stack RangeError: Maximum call stack size exceeded
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:49
npm verb stack     at Set.forEach (<anonymous>)
npm verb stack     at Node.[_reloadEdges] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:21)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:49
npm verb stack     at Set.forEach (<anonymous>)
npm verb stack     at Node.[_reloadEdges] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:21)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:49
npm verb stack     at Set.forEach (<anonymous>)
npm verb stack     at Node.[_reloadEdges] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:21)
npm verb stack     at /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:586:49
npm verb cwd /
npm verb Linux 4.19.76-linuxkit
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--production" "--loglevel" "verbose"
npm verb node v15.0.1
npm verb npm  v7.0.3
npm ERR! Maximum call stack size exceeded
npm verb exit 1
npm timing npm Completed in 1347ms

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-10-24T22_33_53_830Z-debug.log
The command '/bin/sh -c npm install --production --loglevel verbose' returned a non-zero code: 1

Which would indicate to me, that the issue is with the docker image, not with npm.

@rembish
Copy link

rembish commented Oct 26, 2020

Same here:

npm notice 
npm notice New patch version of npm available! 7.0.3 -> 7.0.5
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.0.5>
npm notice Run `npm install -g [email protected]` to update!
npm notice 
npm verb cli [
npm verb cli   '/usr/local/bin/node',
npm verb cli   '/usr/local/bin/npm',
npm verb cli   'install',
npm verb cli   '--loglevel',
npm verb cli   'verbose'
npm verb cli ]
npm info using [email protected]
npm info using [email protected]
npm timing config:load:defaults Completed in 2ms
npm timing config:load:file:/usr/local/lib/node_modules/npm/npmrc Completed in 0ms
npm timing config:load:builtin Completed in 0ms
npm timing config:load:cli Completed in 2ms
npm timing config:load:env Completed in 1ms
npm timing config:load:file:/.npmrc Completed in 0ms
npm timing config:load:project Completed in 0ms
npm timing config:load:file:/root/.npmrc Completed in 0ms
npm timing config:load:user Completed in 0ms
npm timing config:load:file:/usr/local/etc/npmrc Completed in 1ms
npm timing config:load:global Completed in 1ms
npm timing config:load:cafile Completed in 0ms
npm timing config:load:validate Completed in 0ms
npm timing config:load:setUserAgent Completed in 0ms
npm timing config:load:setEnvs Completed in 1ms
npm timing config:load Completed in 7ms
npm verb npm-session 6aebf897f0bd2f71
npm timing npm:load Completed in 18ms
npm timing arborist:ctor Completed in 1ms
npm timing idealTree Completed in 24ms
npm timing command:install Completed in 27ms
npm verb stack RangeError: Maximum call stack size exceeded
npm verb stack     at Node.get parent [as parent] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:691:5)
npm verb stack     at Node.get resolveParent [as resolveParent] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:949:17)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:956:32)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb stack     at Node.resolve (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/node.js:958:28)
npm verb cwd /
npm verb Linux 4.15.0-121-generic
npm verb argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--loglevel" "verbose"
npm verb node v15.0.1
npm verb npm  v7.0.3
npm ERR! Maximum call stack size exceeded
npm verb exit 1
npm timing npm Completed in 249ms

@SimenB
Copy link
Member

SimenB commented Oct 26, 2020

We don't do anything at all with npm except unpack it together with the node binary into /usr/local, tho:

&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \

I still think this is an upstream npm issue.

Have you tried not running as root or installing directly in $HOME?

@ttshivers
Copy link
Member

I think the EXDEV issue is an upstream one that appeared in npm 7. Node 15 is the first one that comes with npm 7. It appears that npm is having trouble again with aufs now that it is using 'rename' again instead of 'move'. npm/arborist#169

@maksimluzik
Copy link

maksimluzik commented Oct 27, 2020

I also got weird error issues with latest docker node image. From weird sh is not recognized command to

npm ERR! code E401
npm ERR! Incorrect or missing password.

when running just pure npm install. Something is really badly broken in latest docker images of node.

This started to happen last Friday (23.10).

greenape added a commit to Flowminder/FlowKit that referenced this issue Nov 2, 2020
@nschonni
Copy link
Member

nschonni commented Nov 5, 2020

Node 15.1.0 images are released. If you're running into NPM issues, they should be reported in that repo, as we have no control over the version of NPM shipped with the images

@nschonni nschonni closed this as completed Nov 5, 2020
@isaacs
Copy link

isaacs commented Nov 11, 2020

Fixed in latest npm release.

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

No branches or pull requests

8 participants