Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !6050

Fix e2e:docker failure with "access denied"

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/jamesknelson/e2e-fix into master Dec 16, 2018
  • Overview 4
  • Commits 2
  • Pipelines 0
  • Changes 1

Created by: jamesknelson

Is this a bug report?

yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

e2e, access denied, test-integrity

Environment

Environment Info:

  System:
    OS: macOS 10.14.1
    CPU: x64 Intel(R) Core(TM) i7-4850HQ CPU @ 2.30GHz
  Binaries:
    Node: 11.1.0 - /usr/local/bin/node
    Yarn: 1.12.3 - /usr/local/bin/yarn
    npm: 6.5.0 - /usr/local/bin/npm
  Browsers:
    Chrome: 71.0.3578.98
    Firefox: 63.0.1
    Safari: 12.0.1
  npmPackages:
    @stiligita/react:  1.0.0-0
    @types/react:  16.7.17
    @types/react-dom:  16.0.11
    react:  16.6.3
    react-dom:  16.6.3
    react-scripts: Not Found
  npmGlobalPackages:
    create-react-app: 2.0.4

Steps to Reproduce

  1. clone repo from scratch
  2. run yarn && yarn e2e:docker

Expected Behavior

Tests should work, especially on the v2.1.1 branch.

Actual Behavior

Fails with this:

+ npm link /tmp/tmp.7E1T0p86DF/node_modules/test-integrity
npm ERR! path /tmp/tmp.7E1T0p86DF/node_modules/test-integrity
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall symlink
npm ERR! Error: EACCES: permission denied, symlink '/tmp/tmp.7E1T0p86DF/node_modules/test-integrity' -> '/usr/local/lib/node_modules/test-integrity'
npm ERR!  { Error: EACCES: permission denied, symlink '/tmp/tmp.7E1T0p86DF/node_modules/test-integrity' -> '/usr/local/lib/node_modules/test-integrity'
npm ERR!   stack: 'Error: EACCES: permission denied, symlink \'/tmp/tmp.7E1T0p86DF/node_modules/test-integrity\' -> \'/usr/local/lib/node_modules/test-integrity\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'symlink',
npm ERR!   path: '/tmp/tmp.7E1T0p86DF/node_modules/test-integrity',
npm ERR!   dest: '/usr/local/lib/node_modules/test-integrity' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2018-12-16T07_02_27_384Z-debug.log
++ set +x
e2e-kitchensink.sh: ERROR! An error was encountered executing line 121.

After dropping into an interactive terminal afterwards, it turns out that the prefix line of /home/node/.npmrc is missing. I don't know why, but my system seems to be removing it at some point.

As a fix, I've defined npm's prefix with an NPM_CONFIG_PREFIX environment variable instead, as per this docker-node guide. This has solved the problem and made the tests pass as expected.

Related issues

At least one other person has recently encountered this same issue:

  • https://github.com/facebook/create-react-app/pull/5457
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jamesknelson/e2e-fix