Pipelines failing with "could not get uid/gid" error

XMLWordPrintable

      The Docker build fails when installing npm with command npm install npm@latest -g, with the following error:

      [91mError: could not get uid/gid
      
      TypeError: 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.

            Assignee:
            Unassigned
            Reporter:
            Norbert Csupka (Inactive)
            Votes:
            9 Vote for this issue
            Watchers:
            16 Start watching this issue

              Created:
              Updated:
              Resolved: