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

Fix e2e:docker failure with "access denied" #6050

Merged
merged 2 commits into from
Jan 22, 2019

Conversation

jamesknelson
Copy link
Contributor

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:

@jamesknelson jamesknelson changed the title E2e fix Fix e2e:docker failure with "access denied" Dec 16, 2018
@stale
Copy link

stale bot commented Jan 18, 2019

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Jan 18, 2019
@jamesknelson
Copy link
Contributor Author

Are there any improvements I could make to this PR to get it merged? I couldn't run the e2e tests without it, but it's a tiny change so I'm not sure what other documentation / testing I'd need to do.

@stale stale bot removed the stale label Jan 22, 2019
@iansu iansu added this to the 2.1.4 milestone Jan 22, 2019
@iansu iansu merged commit 3efcdbf into facebook:master Jan 22, 2019
@iansu
Copy link
Contributor

iansu commented Jan 22, 2019

Thanks!

@lock lock bot locked and limited conversation to collaborators Jan 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants