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

alpine workaround #42

Merged
merged 1 commit into from Feb 1, 2019
Merged

alpine workaround #42

merged 1 commit into from Feb 1, 2019

Conversation

d47zm3
Copy link
Contributor

@d47zm3 d47zm3 commented Jan 30, 2019

there is know bug around alpine/npm described here npm/uid-number#3, build works fine ran from root, but from other non-root user it fails (at least for me), adding "workaround" as described in issue "patches" problem, otherwise an error may occur like this

...
Step 4/18 : FROM alpine:latest AS builder
 ---> 3f53bb00af94
Step 5/18 : RUN   apk add --no-cache nodejs-current npm && rm -rf /var/cache/apk/*   && npm install -g observatory-cli
 ---> Running in d08da129531d
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.8/community/x86_64/APKINDEX.tar.gz
(1/10) Installing ca-certificates (20171114-r3)
(2/10) Installing c-ares (1.14.0-r0)
(3/10) Installing libcrypto1.0 (1.0.2q-r0)
(4/10) Installing libgcc (6.4.0-r9)
(5/10) Installing http-parser (2.8.1-r0)
(6/10) Installing libssl1.0 (1.0.2q-r0)
(7/10) Installing libstdc++ (6.4.0-r9)
(8/10) Installing libuv (1.20.2-r0)
(9/10) Installing nodejs-current (9.11.1-r2)
(10/10) Installing npm (8.14.0-r0)
Executing busybox-1.28.4-r2.trigger
Executing ca-certificates-20171114-r3.trigger
OK: 55 MiB in 23 packages
�[91mError: could not get uid/gid
[ 'nobody', 0 ]

    at /usr/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16
    at ChildProcess.exithandler (child_process.js:280:5)
    at ChildProcess.emit (events.js:180:13)
    at maybeClose (internal/child_process.js:936:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
�[0m�[91mTypeError: Cannot read property 'get' of undefined
    at errorHandler (/usr/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
    at /usr/lib/node_modules/npm/bin/npm-cli.js:78:20
    at cb (/usr/lib/node_modules/npm/lib/npm.js:228:22)
    at /usr/lib/node_modules/npm/lib/npm.js:266:24
    at /usr/lib/node_modules/npm/lib/config/core.js:83:7
    at Array.forEach (<anonymous>)
    at /usr/lib/node_modules/npm/lib/config/core.js:82:13
    at f (/usr/lib/node_modules/npm/node_modules/once/once.js:25:25)
    at afterExtras (/usr/lib/node_modules/npm/lib/config/core.js:173:20)
    at Conf.<anonymous> (/usr/lib/node_modules/npm/lib/config/core.js:231:22)
�[0m�[91m/usr/lib/node_modules/npm/lib/utils/error-handler.js:205
  if (npm.config.get('json')) {

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

Successfully merging this pull request may close these issues.

None yet

2 participants