无法运行prisma deploy:错误:群集未定义不存在

时间:2018-05-30 06:09:41

标签: graphql graphql-js prisma prisma-graphql

我正在学习graphql并遵循本教程https://www.howtographql.com/react-apollo/1-getting-started/

我使用npm install -g prisma安装了prisma,并在服务器文件夹中运行此命令prisma deploy时出现此错误:

config CWD /Users/aravind/tekie/hackernews-react-apollo/server +0ms
  config HOME /Users/aravind +2ms
  config definitionDir /Users/aravind/tekie/hackernews-react-apollo/server/database +5ms
  config definitionPath /Users/aravind/tekie/hackernews-react-apollo/server/database/prisma.yml +0ms
  cli { isGlobal: true } +0ms
  StatusChecker setting status checker +0ms
  cli command id deploy +7ms
  cli:plugincache Got plugin from cache +0ms
  cli:plugincache /Users/aravind/Library/Caches/prisma/plugins.json +1ms
  cli:plugincache Got plugin from cache +1ms
  cli:plugincache /Users/aravind/Library/Caches/prisma/plugins.json +0ms
  plugins findCommand prisma-cli-core +0ms
  plugin requiring command +0ms
  cli-engine:plugins:manager requiring /usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core +0ms
  portfinder:defaultHosts exports._defaultHosts is: [ '0.0.0.0', '127.0.0.1', '::1', 'fe80::1', 'fe80::18fb:a4af:2b44:3fea', '192.168.43.100', '2405:204:6209:18b0:144f:bac3:86ac:3cdf', '2405:204:6209:18b0:fd46:e3b7:952f:d569', 'fe80::1c49:3cff:fe5f:7e16', 'fe80::3e5f:ab5d:16dd:a8bf' ] +0ms
  cli-engine:plugins:manager required +538ms
  plugin required command +540ms
  StatusChecker setting status checker +569ms
Error: Cluster undefined does not exist.
    at Deploy.<anonymous> (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/src/commands/deploy/index.ts:175:13)
    at step (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:42:23)
    at Object.next (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:23:53)
    at fulfilled (/usr/local/lib/node_modules/prisma/node_modules/prisma-cli-core/dist/commands/deploy/index.js:14:58)
    at <anonymous>
  util timed out +0ms
Exiting with code: 0

到目前为止,所有设置都是正确的,我无法运行此命令。任何帮助表示赞赏。

2 个答案:

答案 0 :(得分:1)

在同一教程中,我还目睹了您在尝试部署服务时发现的相同问题。

我偶然发现了教程编写者in this GitHub issue本身的“解决方案”:

  

当前版本的教程仅适用于Prisma CLI   版本<1.7,因此请确保已安装一些1.6.x版本。您   可以使用以下命令检查您当前的pyramida版本:

prisma version
     

然后卸载并安装正确的版本,如下所示:

npm uninstall -g prisma
     

npm install -g prisma@1.6.3

答案 1 :(得分:-1)

在下载纱线不使用npm prisma deploy

之后,您可以使用纱线prisma部署吗?