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

gyp WARN EACCES user "undefined" does not have permission to access the dev dir #34

Open
ElGranLoky opened this issue Mar 6, 2018 · 2 comments

Comments

@ElGranLoky
Copy link

When I build the project with gitlab-ci get stuck in infinity loop:

  • Gitlab-CI
image: docker:latest

variables:
  REGISTRO: "XXXXXXX"
  NAMESPACE: "XXXXXX"
  DOCKER_DRIVER: overlay
  GIT_SUBMODULE_STRATEGY: recursive

services:
  - docker:dind

stages:
  - build

before_script:
  - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $REGISTRO

build_master:
  stage: build
  script:
    - docker pull $REGISTRO/$NAMESPACE/$CI_PROJECT_NAME:latest || true
    - docker build --cache-from $REGISTRO/$NAMESPACE/$CI_PROJECT_NAME:latest -t $REGISTRO/$NAMESPACE/$CI_PROJECT_NAME:stable .
    - docker push $REGISTRO/$NAMESPACE/$CI_PROJECT_NAME:stable
  only:
    - master
  • Dockerfile:
FROM abernix/meteord:node-8-devbuild
  • Log giltab-runner:
�[91mautoprefixer: /copied-app/packages/gadicohen_prism/lib/prism/plugins/line-highlight/prism-line-highlight.css:17:1: Gradient has outdated direction syntax. New syntax is like `to left` instead of `right`.
�[0m�[91m+ echo '=> Printing Meteor Node information...'
�[0m�[91m+ echo '  => platform'
+ meteor node -p process.platform
�[0m=> Printing Meteor Node information...
  => platform
linux
�[91m+ echo '  => arch'
+ meteor node -p process.arch
�[0m  => arch
x64
�[91m+ echo '  => versions'
+ meteor node -p process.versions
�[0m  => versions
{ http_parser: '2.7.0',
  node: '4.8.0',
  v8: '4.5.103.45',
  uv: '1.9.1',
  zlib: '1.2.8',
  ares: '1.10.1-DEV',
  icu: '56.1',
  modules: '46',
  openssl: '1.0.2k' }
�[91m+ echo '=> Printing System Node information...'
+ echo '  => platform'
+ node -p process.platform
�[0m=> Printing System Node information...
  => platform
linux
�[91m+ echo '  => arch'
+ node -p process.arch
�[0m  => arch
x64
  => versions
�[91m+ echo '  => versions'
+ node -p process.versions
�[0m{ http_parser: '2.7.0',
  node: '8.9.3',
  v8: '6.1.534.48',
  uv: '1.15.0',
  zlib: '1.2.11',
  ares: '1.10.1-DEV',
  modules: '57',
  nghttp2: '1.25.0',
  openssl: '1.0.2n',
  icu: '59.1',
  unicode: '9.0',
  cldr: '31.0.1',
  tz: '2017b' }
�[91m+ echo '=> Executing NPM install within Bundle'
+ cd /tmp/bundle-dir/bundle/programs/server/
�[0m�[91m+ npm i
�[0m=> Executing NPM install within Bundle
�[91mnpm�[0m�[91m WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but npm-shrinkwrap.json was generated for lockfileVersion@0. I'll try to do my best with it!
�[0m
> fibers@1.0.15 install /tmp/bundle-dir/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js

�[91mgyp WARN�[0m�[91m EACCES user "undefined" does not have permission to access the dev dir "/root/.node-gyp/8.9.3"
gyp�[0m�[91m WARN EACCES attempting to reinstall using temporary dev dir "/tmp/bundle-dir/bundle/programs/server/node_modules/fibers/.node-gyp"
�[0m�[91mgyp WARN EACCES user "undefined" does not have permission to access the dev dir "/tmp/bundle-dir/bundle/programs/server/node_modules/fibers/.node-gyp/8.9.3"
gyp WARN �[0m�[91mEACCES attempting to reinstall using temporary dev dir "/tmp/bundle-dir/bundle/programs/server/node_modules/fibers/.node-gyp"
...

If I perform the compilation on a computer without dind it works without problems.

I dont know if this could be a solution -> How to use --unsafe-perm in dind?

@MaxTwentythree
Copy link

With the version for Node 12, I'm also running into a similar issue

gyp WARN EACCES current user does not have permission to access the dev dir "/root/.cache/node-gyp/12.14.0"
gyp WARN EACCES attempting to reinstall using temporary dev dir "/tmp/bundle-dir/bundle/programs/server/node_modules/fibers/.node-gyp"
gyp WARN install got an error, rolling back install
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/tmp/bundle-dir/bundle/programs/server/node_modules/fibers/.node-gyp
gyp ERR! System Linux 4.9.184-linuxkit
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /tmp/bundle-dir/bundle/programs/server/node_modules/fibers
gyp ERR! node -v v12.14.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok`

@MaxTwentythree
Copy link

Ah, sorry, my fault!
My local meteor version and the containers meteor version didn't match, it works now!

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

No branches or pull requests

2 participants