Prisma1: Cannot bootstrap a simple project

Created on 25 Apr 2018  路  5Comments  路  Source: prisma/prisma1

Bug Report

Current behavior

Just followed the instructions on:

https://www.prisma.io/docs/1.0/quickstart/backend/node/node-phe8vai1oo

Using Chrome and loading: http://localhost:4466/gqlserv/dev and http://localhost:4000/ (after doing 'yarn dev') worked for a while while I was clicking away investigating the interface. Shorty after, 1-2 minutes the pages would only render a black screen. Reloading or force reloading the page would make the page reload but still just display a black page only. Restarting Docker and/or the yarn server had no effect.

Trying in Firefox, the pages do load (I see the interface) but http://localhost:4466/gqlserv/dev cannot connect to the :4000 server and cannot display the Schema with a constantly loading cursor. In the development console I see a series of repeated:

Error: Server response was missing for query 'IntrospectionQuery'.
Stack trace:
u@http://cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js:1:1072333
c/</<@http://cdn.jsdelivr.net/npm/graphql-playground-react/build/static/js/middleware.js:1:1072743

Disabling ad blockers has not effect.

I have not edited any files yet, this is straight out following the quickstart tutorial.

Furthermore sending a simple:

query {
  post {
    title
  }
}

through the localhost:4000 server gives me a:

{
  "error": "Response not successful: Received status code 400"
}

Schema resolves correctly on :4000, btw.

Docker logs on the prisma docker file is full of repeated "innocent" only looking:

{"@timestamp":"2018-04-25T08:40:23.085+00:00","@version":1,"message":"{\"key\":\"request/new\",\"requestId\":\"api:api:cjgeumzvx005f0192npplmnf4\"}","logger_name":"com.prisma.api.server.ApiServer","thread_name":"single-server-akka.actor.default-dispatcher-18","level":"INFO"
,"level_value":20000,"HOSTNAME":"b159f1622df4"}
{"@timestamp":"2018-04-25T08:40:32.033+00:00","@version":1,"message":"{\"key\":\"request/new\",\"requestId\":\"api:api:cjgeun6sh005g0192lru70wuj\"}","logger_name":"com.prisma.api.server.ApiServer","thread_name":"single-server-akka.actor.default-dispatcher-15","level":"INFO"
,"level_value":20000,"HOSTNAME":"b159f1622df4"}
{"@timestamp":"2018-04-25T08:40:46.010+00:00","@version":1,"message":"{\"key\":\"request/new\",\"requestId\":\"api:api:cjgeunhkq005h0192yajeg828\"}","logger_name":"com.prisma.api.server.ApiServer","thread_name":"single-server-akka.actor.default-dispatcher-19","level":"INFO"
,"level_value":20000,"HOSTNAME":"b159f1622df4"}
{"@timestamp":"2018-04-25T08:41:08.049+00:00","@version":1,"message":"{\"key\":\"request/new\",\"requestId\":\"api:api:cjgeunykw005i0192as0w9q51\"}","logger_name":"com.prisma.api.server.ApiServer","thread_name":"single-server-akka.actor.default-dispatcher-15","level":"INFO"
,"level_value":20000,"HOSTNAME":"b159f1622df4"}

Expected behavior?

Well, a smoother first impression. Impressed enough to try the project and try to quickstart it, but a sour taste when the "hello world" does not work.

All 5 comments

Hey @stratosgear, thanks a lot for opening this issue! We're literally updating the Quickstart tutorials _right now_ to accommodate for the changes of yesterday's 1.7 release. Sorry that you're now running into this!!

For now, please just use the GraphQL CLI to bootstrap a server, most of the information in the tutorial will still be valid - just the instructions don't work.

npm install -g graphql-cli
graphql create myapp --boilerplate node-basic
cd myapp
yarn dev

Another option would be to explicitly install an older version of the Prisma CLI:

npm install -g [email protected]

I also added a corresponding note to the tutorial.

Haha, yes, I just tried to recreate the project right now (kind of a "hard reboot") and npm suggested to upgrade from 1.6.3 to 1.7.1

I did and the previous prisma init myproj is completely different now.

I guess I will have to wait a little until the dust settles.

The quickstart is now updated: https://www.prisma.io/docs/quickstart/backend/node/node-phe8vai1oo

Thanks again for opening this issue 馃檶

If anyone is wondering how to deploy the quickstart project locally, here's a workaround:

  • follow the instructions given by @nikolasburk
  • prisma init in the project root
  • mv docker-compose.yml database
  • in .env set PRISMA_ENDPOINT="http://localhost:4466"
  • cd database
  • prisma deploy -e ../.env
  • yarn dev
Was this page helpful?
0 / 5 - 0 ratings

Related issues

hoodsy picture hoodsy  路  3Comments

marktani picture marktani  路  3Comments

marktani picture marktani  路  3Comments

thomaswright picture thomaswright  路  3Comments

sorenbs picture sorenbs  路  3Comments