User rights problem for a `bin/test` run
Closed this issue · 5 comments
Hi,
I'd like to say that so far (even if it doesn't work ^^) I really like this project.
That being said I got :
Removing intermediate container 29bb0bcf9d4b
Successfully built defa070fc063
Successfully tagged dockergridnightwatch_nightwatch:latest
WARNING: Image for service nightwatch was built because it did not already exist. To rebuild this image you must use `docker-compose build` or `docker-compose up --build`.
Error: EACCES: permission denied, scandir '/usr/src/app'
TypeError: Cannot read property 'get' of undefined
at errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:213:17)
at /usr/local/lib/node_modules/npm/bin/npm-cli.js:83:20
at cb (/usr/local/lib/node_modules/npm/lib/npm.js:215:22)
at /usr/local/lib/node_modules/npm/lib/npm.js:253:24
at /usr/local/lib/node_modules/npm/lib/config/core.js:81:7
at Array.forEach (native)
at /usr/local/lib/node_modules/npm/lib/config/core.js:80:13
at f (/usr/local/lib/node_modules/npm/node_modules/once/once.js:25:25)
at /usr/local/lib/node_modules/npm/lib/config/core.js:110:20
at /usr/local/lib/node_modules/npm/lib/config/load-prefix.js:48:7
/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:213
if (npm.config.get('json')) {
^
TypeError: Cannot read property 'get' of undefined
at process.errorHandler (/usr/local/lib/node_modules/npm/lib/utils/error-handler.js:213:17)
at emitOne (events.js:115:13)
at process.emit (events.js:210:7)
at process._fatalException (bootstrap_node.js:329:26)
After first (and fresh and clean I guess) launch.
Happy to help, so tell me. :)
Thanks so much for reporting the error! Sorry for taking so long to respond. I'll take a look today.
A few questions to help me debug:
- Are you using Mac or Linux?
- Are you using Dinghy, Dory, or neither? If yes, are you on the latest version?
- Are you using latest versions of docker-machine, docker, and docker-compose?
Linux Mint (latest I guess) without dory, docker native. I will grab more info next monday.
EDIT:
As promised:
➜ ~ lsb_release -d
Description: Linux Mint 18.1 Serena
➜ ~ docker -v
Docker version 17.05.0-ce, build 89658be
➜ ~ docker-compose -v
docker-compose version 1.12.0, build b31ff33
Okay, I've looked up the docker-compose file and I see you were using host mounted volume:
volumes:
- .:/usr/src/app
I believe using host mounted volume and trying to work with it generates the error. I already had a similar issue in one of my projects. I tried without the line (as you COPY the very same content during the build) and it works but all the tests are failing. I'll continue my investigation. :)
Thanks! Has the error changed?
I believe last merge was good. Except for that npm update check failed
after launching a test. But that's another issue and requires a total rework of the Dockerfile. At least it's what I found during my late investigations.