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
- clone repo from scratch
- 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: