Skip to content

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

Merged
iansu merged 2 commits into
react:masterfrom
jamesknelson:e2e-fix
Jan 22, 2019
Merged

Fix e2e:docker failure with "access denied"#6050
iansu merged 2 commits into
react:masterfrom
jamesknelson:e2e-fix

Conversation

@jamesknelson

Copy link
Copy Markdown
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:

@jamesknelsonjamesknelson changed the title E2e fixFix e2e:docker failure with "access denied"Dec 16, 2018
@stale

staleBot commented Jan 18, 2019

Copy link
Copy Markdown

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.

@stalestaleBot added the stale label Jan 18, 2019
@jamesknelson

Copy link
Copy Markdown
ContributorAuthor

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.

@stalestaleBot removed the stale label Jan 22, 2019
@iansuiansu added this to the 2.1.4 milestone Jan 22, 2019
@iansu
iansu merged commit 3efcdbf into react:masterJan 22, 2019
@iansu

Copy link
Copy Markdown
Contributor

Thanks!

@locklockBot locked and limited conversation to collaborators Jan 27, 2019
Sign up for freeto 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

@jamesknelson@iansu@facebook-github-bot