1

我在我的 Mac 上本地安装了 graphcool,我认为这一切正常:

$ sudo 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/graphcool-framework -> /usr/local/lib/node_modules/graphcool/dist/index.js
/usr/local/bin/gcf -> /usr/local/lib/node_modules/graphcool/dist/index.js
+ graphcool@0.11.4
updated 1 package in 7.251s

但是graphcool似乎没有被识别:

$ graphcool init server
-bash: graphcool: command not found

我从graphcool init.

谁能帮我?

4

2 回答 2

7

似乎他们将二进制名称从graphcooltographcool-frameworkgcf

https://github.com/graphcool/framework/commit/5de2334440c55f6a42f6d75ad1b06a8d320d5e40

尝试:

graphcool-framework init

如果您收到“没有这样的文件或目录,lstat '~/.graphcool'”的错误消息,请执行

touch ~/.graphcool

然后重新输入上面的init命令

于 2017-12-23T17:19:41.817 回答
0

我设置graphcool的顺序是:

npm install -g graphcool-framework
mkdir ~/.graphcool
cd .graphcool
touch config.yml
graphcool-framework init server
于 2018-01-02T16:42:26.217 回答