Graphql 无法运行prisma部署:错误:未定义的群集不存在

Graphql 无法运行prisma部署:错误:未定义的群集不存在,graphql,graphql-js,prisma,prisma-graphql,Graphql,Graphql Js,Prisma,Prisma Graphql,我正在学习graphql并遵循本教程 我使用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-reac

我正在学习graphql并遵循本教程

我使用
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
config CWD/Users/aravind/tekie/hackernews-react-apollo/server+0ms
配置HOME/Users/aravind+2ms
配置定义dir/Users/aravind/tekie/hackernews-react-apollo/server/database+5ms
配置定义路径/Users/aravind/tekie/hackernews-react-apollo/server/database/prisma.yml+0ms
cli{isGlobal:true}+0ms
状态检查器设置状态检查器+0ms
cli命令id部署+7ms
cli:plugincache从缓存中获取插件+0ms
cli:plugincache/Users/aravind/Library/Caches/prisma/plugins.json+1ms
cli:plugincache从缓存中获取插件+1ms
cli:plugincache/Users/aravind/Library/Caches/prisma/plugins.json+0ms
插件findCommand和prisma cli core+0ms
需要命令+0ms的插件
cli引擎:插件:需要/usr/local/lib/node_modules/prisma/node_modules/prisma cli核心+0ms的管理器
portfinder:defaultHosts exports._defaultHosts是:['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:E5F:ab5d:16dd:8BA8BS']
cli引擎:插件:需要管理器+538ms
插件所需命令+540ms
状态检查器设置状态检查器+569ms
错误:未定义的群集不存在。
在部署时。(/usr/local/lib/node_modules/prisma/node_modules/prisma cli core/src/commands/deploy/index.ts:175:13)
在步骤(/usr/local/lib/node_modules/prisma/node_modules/prisma cli core/dist/commands/deploy/index.js:42:23)
在Object.next(/usr/local/lib/node_modules/prisma/node_modules/prisma cli core/dist/commands/deploy/index.js:23:53)
完成时(/usr/local/lib/node_modules/prisma/node_modules/prisma cli core/dist/commands/deploy/index.js:14:58)
在
util超时+0毫秒
正在退出,代码为:0

到目前为止,所有设置都是正确的,我无法运行此命令。非常感谢您的帮助。

下载Thread后,您是否可以使用Thread prisma deploy运行而不使用npm prisma deploy

我还看到了您在尝试部署服务时发现的相同问题,遵循相同的教程

我偶然发现了教程作者自己的“解决方案”:

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

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

npm uninstall -g prisma
npm安装-gprisma@1.6.3


您能否另外共享您的
prisma.yml
文件和
~/.prisma/config.yml
文件?在此处共享之前,请删除所有敏感信息。例如,
config.yml
文件包含一个不应共享的
cloudSessionKey