Issue by Merott
_Saturday Sep 16, 2017 at 11:48 GMT_
_Originally opened as https://github.com/graphcool/cli/issues/252_
I'm trying to run graphcool auth (version 1.3.16-beta-8) on docker, using node:latest, and it is failing with this output:
graphcool auth -t $GRAPHCOOL_AUTH_TOKEN
cli starting run +0ms
cli dispatcher +3ms
cli command id: auth, argv: /usr/local/bin/graphcool,auth,-t,{{AUTH_TOKEN_HERE}} +0ms
cli:dispatcher finding auth command +0ms
rwlockfile write /root/.cache/graphcool/update.lock +0ms
rwlockfile read /root/.cache/graphcool/update.lock +4ms
cli:plugincache updating cache for /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-core +0ms
cli:plugincache updating cache for /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/commands +59ms
cli running cmd +92ms
Using token from --token flag
Authenticating...Error: Exited with code 3
at ChildProcess.cp.once.code (/usr/local/lib/node_modules/graphcool/node_modules/opn/index.js:82:13)
at Object.onceWrapper (events.js:318:30)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:545:12)
Exiting with code: 1
You can reproduce this by running the docker image:
docker run -i -t node:latest /bin/bash
And executing the below within the docker machine:
npm -g install graphcool@beta
# rename some files because the system is case-sensitive and casings are wrong
mv /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Cli.js /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/CLI.js
mv /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Plugin/plugin.js /usr/local/lib/node_modules/graphcool/node_modules/graphcool-cli-engine/dist/Plugin/Plugin.js
export DEBUG="*"
graphcool auth -t {{AUTH_TOKEN}}
No need for the step # rename some files because the system is case-sensitive and casings are wrong, since the bugfix for that was merged in lately 馃憤
The CLI tries to write the token to ~/.graphcool. Is that location accessible in your setup? Based on the stack trace, I have a feeling this has something to do with writing that file.
The location is definitely accessible and writable.
Then my feeling was wrong :see_no_evil:
Fixed in the latest preview.