简体   繁体   English

zsh:找不到命令:get-graphql-schema

[英]zsh: command not found: get-graphql-schema

I'm trying to download my graphcms schema into my flutter project.我正在尝试将我的 graphcms 架构下载到我的 flutter 项目中。 I'm using Ferry as the graphql client.我使用 Ferry 作为 graphql 客户端。

According to the ferry docs I just need to run npm install -g get-graphql-schema and then run get-graphql-schema [ENDPOINT_URL] > lib/schema.graphql to download the schema.根据渡轮文档,我只需要运行npm install -g get-graphql-schema然后运行get-graphql-schema [ENDPOINT_URL] > lib/schema.graphql来下载模式。

However, when I try running that command, I get this in the terminal: zsh: command not found: get-graphql-schema .但是,当我尝试运行该命令时,我在终端中得到了这个: zsh: command not found: get-graphql-schema

I'm using an m1 mac - not sure if this is an m1-specific issue.我正在使用 m1 mac - 不确定这是否是 m1 特定的问题。

Any ideas on how to solve this would be much appreciated.任何关于如何解决这个问题的想法将不胜感激。

You must remove the apollo-cli by command:您必须通过命令删除 apollo-cli:

brew uninstall apollo-cli

And try run get-graphql-schema [ENDPOINT_URL] > lib/schema.graphql again.并再次尝试运行get-graphql-schema [ENDPOINT_URL] > lib/schema.graphql In my case, it's successfully.就我而言,它是成功的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM