Bash: graphcool: command not found


#1

Hello,

Just getting started with graphcool, looks great! I can’t seem to access the command from bash. I’ve tried to sudo install, but that makes no difference. Also uninstall-reinstalled with sudo. Any clues?


#2

Hey Nick,

with the latest Framework version, the CLI binary was renamed to graphcool-framework.

graphcool is now used for the preview of the Graphcool 1.0 CLI.

Hope this helps! :smile:


#3

so we use the graphcool-framework or the Graphcool 1.0 CLI ? got same problem here.


#4

I’m having the same issue. I tried to install graphcool for react front-end via the following instructions: https://www.graph.cool/docs/quickstart/frontend/react/apollo-tijghei9go/

I even tried “sudo npm install -g graphcool”, but when I tried the following command “graphcool init server”, I got “graphcool: command not found”.


#5

so I did just get graphcool command to work, but I had to reinstall it with the following command: “sudo npm install -g graphcool@next”. Not sure if that is correct, but I would like to know what I am not doing right. Thanks!


#6

Don’t use graphcool@next anymore.

Did you read Bash: graphcool: command not found and all links I mentioned in that post? It should cover all your questions already :slightly_smiling_face:


#7

You did not get the problem. After intalling graphcool or graphcool-framework , we are not able to use init command


#8

@ali.malik: You are installing graphcool with sudo. This might be a problem with your local npm installation.

@amarpathak: Do you have more information that helps me reproduce this problem?


#9

It’s not really a problem with npm - by default the global node_modules is in a write-protected folder. I’m able to install with sudo and it works fine - though running graphcool init doesn’t actually call graphql create like it says it does (it just creates an empty dir and says it’s calling graphql create, then exits). I’m wondering if this is a regression in beta4?


#10

I’m also having trouble installing graphcool. (with and without sudo)

MaartenMacBookPro-2:graphcoolv1 $ npm install -g graceful-fs
+ graceful-fs@4.1.11
added 1 package in 1.015s
MaartenMacBookPro-2:graphcoolv1 $ npm install -g graphcool
npm WARN deprecated jsonstream@1.0.3: use JSONStream instead
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
/usr/local/bin/gcf -> /usr/local/lib/node_modules/graphcool/dist/index.js
/usr/local/bin/graphcool-framework -> /usr/local/lib/node_modules/graphcool/dist/index.js
+ graphcool@0.11.4
updated 1 package in 11.229s
MaartenMacBookPro-2:graphcoolv1 maarten$ graphcool init hello-world
bash: graphcool: command not found
MaartenMacBookPro-2:graphcoolv1 $ graphcool -v
bash: graphcool: command not found
MaartenMacBookPro-2:graphcoolv1 $ sudo npm install -g graphcool
Password:
npm WARN deprecated jsonstream@1.0.3: use JSONStream instead
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
/usr/local/bin/gcf -> /usr/local/lib/node_modules/graphcool/dist/index.js
/usr/local/bin/graphcool-framework -> /usr/local/lib/node_modules/graphcool/dist/index.js
+ graphcool@0.11.4
updated 1 package in 11.797s
MaartenMacBookPro-2:graphcoolv1 $ graphcool init hello-world
bash: graphcool: command not found
MaartenMacBookPro-2:graphcoolv1 $

It also seems to be corrupting my already installed version of graphql-framework

MaartenMacBookPro-2:graphcoolv1 $ graphcool-framework init hello-world
 ▸    'ENOENT': ENOENT: no such file or directory, lstat
 ▸    '/Users/mrtn/.graphcool'

Get in touch if you need help: https://www.graph.cool/forum
To get more detailed output, run $ export DEBUG="*"
MaartenMacBookPro-2:graphcoolv1 maarten$

#11

Chances are, as @nilan mentioned earlier in this post, you should be installing either graphcool-framework for the latest 0.x release or graphcool@beta for the 1.0 release - the latter is the one that sounds like what you want. If I have to bet, you’re probably repeatedly stepping on yourself if I had to bet.