【问题标题】:graphcool: command not found (locally on Mac)graphcool:找不到命令(在 Mac 上本地)
【发布时间】:2018-06-05 17:27:49
【问题描述】:

我正在我的 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 收到同样的错误。

谁能帮帮我?

【问题讨论】:

标签: graphcool


【解决方案1】:

似乎他们将二进制名称从 graphcool 更改为 graphcool-framework 和 gcf

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

试试:

graphcool-framework init

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

touch ~/.graphcool

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

【讨论】:

    【解决方案2】:

    我设置graphcool的顺序是:

    npm install -g graphcool-framework
    mkdir ~/.graphcool
    cd .graphcool
    touch config.yml
    graphcool-framework init server
    

    【讨论】:

      猜你喜欢
      • 2021-06-19
      • 2018-08-03
      • 2016-10-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-10-15
      • 2015-12-21
      相关资源
      最近更新 更多