jac
10/25/2017, 3:46 AMnpm install -g graphcool@next
but the howtographql uses npm install -g graph cool
. My first question is, which one is out of date? Or should they both be correct for their respective tutorial? I suspect a problem because graphcool@next (graphcool/0.8.1) returns Unknown flag --schema
when I run, for example graphcool init --schema <https://graphqlbin.com/hn-starter.graphql> --name Hackernews
. But I think theres a bug with graphcool@1.3.7 because when I try graphcool --version
or anything else I get ✖ Error: Unexpected token c in JSON at position 0
graphcool SyntaxError: Unexpected token c in JSON at position 0
graphcool at JSON.parse (<anonymous>)
graphcool at Config.load (/Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/utils/config.js:23:29)
graphcool at defaultEnvironment (/Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/index.js:141:12)
graphcool at /Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/index.js:40:21
graphcool at Generator.next (<anonymous>)
graphcool at /Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/index.js:8:71
graphcool at new Promise (<anonymous>)
graphcool at __awaiter (/Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/index.js:4:12)
graphcool at main (/Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/index.js:37:12)
graphcool at Object.<anonymous> (/Users/jac/.nvm/versions/node/v8.7.0/lib/node_modules/graphcool/dist/src/index.js:149:1)
graphcool at Module._compile (module.js:624:30)
graphcool at Object.Module._extensions..js (module.js:635:10)
graphcool at Module.load (module.js:545:32)
graphcool at tryModuleLoad (module.js:508:12)
graphcool at Function.Module._load (module.js:500:3)
graphcool at Function.Module.runMain (module.js:665:10)
graphcool at startup (bootstrap_node.js:187:16)
graphcool at bootstrap_node.js:608:3 +0ms