tailhook / vagga

Vagga is a containerization tool without daemons
http://vagga.readthedocs.org
MIT License
1.86k stars 96 forks source link

Fix npm tests; limit minimum supported Alpine version with working npm is 3.9 #563

Closed anti-social closed 2 years ago

anti-social commented 2 years ago

Possibly you know a workaround for the fault:

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'ls', '--global' ]
2 info using npm@3.10.10
3 info using node@v6.10.3
4 verbose stack Error: could not get uid/gid
4 verbose stack [ 'nobody', 0 ]
4 verbose stack
4 verbose stack     at /usr/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16
4 verbose stack     at ChildProcess.exithandler (child_process.js:211:5)
4 verbose stack     at emitTwo (events.js:106:13)
4 verbose stack     at ChildProcess.emit (events.js:191:7)
4 verbose stack     at maybeClose (internal/child_process.js:886:16)
4 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
5 verbose cwd /work
6 error Linux 5.15.7-arch1-1
7 error argv "/usr/bin/node" "/usr/bin/npm" "ls" "--global"
8 error node v6.10.3
9 error npm  v3.10.10
10 error code Error: Command failed: /usr/bin/node /usr/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js nobody 0
10 error code [ 'nobody', 0 ]
10 error code
10 error code     at ChildProcess.exithandler (child_process.js:204:12)
10 error code     at emitTwo (events.js:106:13)
10 error code     at ChildProcess.emit (events.js:191:7)
10 error code     at maybeClose (internal/child_process.js:886:16)
10 error code     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
10 error code  { Error: Command failed: /usr/bin/node /usr/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js nobody 0
10 error code [ 'nobody', 0 ]
10 error code
10 error code     at ChildProcess.exithandler (child_process.js:204:12)
10 error code     at emitTwo (events.js:106:13)
10 error code     at ChildProcess.emit (events.js:191:7)
10 error code     at maybeClose (internal/child_process.js:886:16)
10 error code     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
10 error code   killed: false,
10 error code   code: null,
10 error code   signal: 'SIGSEGV',
10 error code   cmd: '/usr/bin/node /usr/lib/node_modules/npm/node_modules/uid-number/get-uid-gid.js nobody 0' }
11 error could not get uid/gid
11 error [ 'nobody', 0 ]
12 error If you need help, you may report this error at:
12 error     <https://github.com/npm/npm/issues>
13 verbose exit [ 1, true ]

https://github.com/nodejs/docker-node/issues/813

tailhook commented 2 years ago

I've adjusted error message a bit and merged.

I think v3.9 is already old enough to drop support of earlier versions.

That said, I don't know the workaround. It was probably happened somewhere in between of 3.5 and 3.8, which I probably never used with npm.