-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Medium
-
Component/s: Pipelines - Run Failures
The Docker build fails when installing npm with command npm install npm@latest -g, with the following error:
[91mError: could not get uid/gid
[0m[91mTypeError: Cannot read property 'get' of undefined
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at emitOne (events.js:116:13)
at process.emit (events.js:211:7)
at process._fatalException (bootstrap_node.js:374:26)
The command '/bin/sh -c apk add --update nodejs nodejs-npm && npm install npm@latest -g' returned a non-zero code: 7
When building the Docker-image locally it works without any problems.
Workaround is to set the "unsafe-perm" flag as true seems to fix this particular issue, but other node-related things may fail using this flag.