This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
Cannot get UID/GID #7
Closed
Description
I'm getting the following error using node-alpine:10.9.0.
It seems like lots of other people are also having similar issues on a variety of different node versions, but there is currently not an open issue (that I am aware of) representing this issue with recent examples.
For reference, please also see: #3
Here is the error I'm getting:
Error: could not get uid/gid
[ 'nobody', 0 ]
at /usr/local/lib/node_modules/npm/node_modules/uid-number/uid-number.js:37:16
at ChildProcess.exithandler (child_process.js:296:5)
at ChildProcess.emit (events.js:182:13)
at maybeClose (internal/child_process.js:961:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:250:5)
TypeError: Cannot read property 'get' of undefined
at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:76:20
at cb (/usr/local/lib/node_modules/npm/lib/npm.js:228:22)
at /usr/local/lib/node_modules/npm/lib/npm.js:266:24
at /usr/local/lib/node_modules/npm/lib/config/core.js:83:7
at Array.forEach (<anonymous>)
at /usr/local/lib/node_modules/npm/lib/config/core.js:82:13
at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)
at afterExtras (/usr/local/lib/node_modules/npm/lib/config/core.js:173:20)
at Conf.<anonymous> (/usr/local/lib/node_modules/npm/lib/config/core.js:231:22)
/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:205:18)
at process.emit (events.js:182:13)
at process._fatalException (internal/bootstrap/node.js:472:27)
Here is my docker file for reference:
FROM node:10.9.0-alpine
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
# Install a bunch of junk I need
RUN apk --no-cache add --virtual native-deps g++ gcc libgcc libstdc++ linux-headers make python
# This is the line that fails
RUN npm install --quiet node-gyp -g
# I never make it to here
RUN npm install
RUN apk del native-deps
# If you are building your code for production
# RUN npm install --only=production
# Bundle app source
COPY . .
# Setup the app
RUN npm run build
EXPOSE 1337
CMD [ "npm", "start" ]
Metadata
Metadata
Assignees
Labels
No labels