Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.0.0-preview017] Error: Get config SyntaxError: Unexpected token P in JSON at position 0 #985

Closed
kripod opened this issue Nov 25, 2019 · 16 comments
Assignees
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/regression A reported bug in functionality that used to work before.
Milestone

Comments

@kripod
Copy link
Contributor

kripod commented Nov 25, 2019

While executing npx prisma2 lift save on a clean repo after upgrading the Prisma framework, I encountered the error message as described in the title:

image

@kripod
Copy link
Contributor Author

kripod commented Nov 25, 2019

Also, while executing prisma2 generate, the following error message came along:

Error: Problem while parsing the query engine response at C:\Development\Projects\exigo\node_modules\prisma2\query-engine-windows.exe. Please wait until the 'prisma query-engine' download completes!
SyntaxError: Unexpected token P in JSON at position 0
    at JSON.parse (<anonymous>)
    at Object.<anonymous> (C:\Development\Projects\exigo\node_modules\prisma2\build\index.js:109803:25)
    at Generator.next (<anonymous>)
    at fulfilled (C:\Development\Projects\exigo\node_modules\prisma2\build\index.js:109753:58)

@pantharshit00 pantharshit00 added bug/2-confirmed Bug has been reproduced and confirmed. kind/regression A reported bug in functionality that used to work before. labels Nov 25, 2019
@pantharshit00
Copy link
Contributor

I am able to confirm this bug on windows. I am unable to reproduce this on MacOS though.

image

@smartnet-club
Copy link

The content of query-engine-windows.exe after npm install:

#!/usr/bin/env node
console.log("Please wait until the 'prisma query-engine' download completes!")

@timsuchanek
Copy link
Contributor

Thanks a lot for reporting!
We just fixed this in the latest patch https://github.com/prisma/prisma2/releases/tag/2.0.0-preview017.1

@suevalov
Copy link

@timsuchanek I'm experiencing the same issue with latest preview18.2. Rollback to preview17.2 fixes the issue.

@janpio
Copy link
Member

janpio commented Dec 14, 2019

Can you please open a new issue @suevalov? Provide some information that might help us reproduce it.

@jlarmstrongiv
Copy link

I have been debugging this all night. The issue cannot be reproduced on mac. However, it causes errors on windows and unix (vscode online).

Here's a sample repo:
https://github.com/jlarmstrongiv/temp-prisma-template

Steps:

  • cd temp-prisma-template
  • yarn install
  • npx prisma2 dev
  • yarn generate
  • yarn dev:nexus

@jlarmstrongiv
Copy link

Downgrading to 17.2 did not fix the issue for me

@zw-slime
Copy link

Downgrading to 17.2 did not fix the issue for me
+1

@janpio

This comment has been minimized.

@tobkle
Copy link

tobkle commented Jan 5, 2020

Same problem with

prisma2@2.0.0-preview019, binary version: e7579bd35e0938dbf773f1706c098a0d14a5a038

@YannSuissa
Copy link

YannSuissa commented Jan 5, 2020

Same here downgraded to :
npm i prisma2@2.0.0-preview017.2
fixed the bug

@dizzyn
Copy link

dizzyn commented Jan 5, 2020

Have the same issue with 2.0.0-preview019 on Heroku

@pantharshit00
Copy link
Contributor

Can you all please try reinstalling photon? This might be related to #1232 (comment)

Otherwise please open a new issue with a proper reproduction.

@dizzyn
Copy link

dizzyn commented Jan 6, 2020

Thank you, now i see that the problem was in my case caused by the situation that I haven't have the folder migration in the proper state. So it can be fixed by removing the folder and renew them by prisma2 dev.

Thank you for the help.

@janpio
Copy link
Member

janpio commented Jan 7, 2020

Please open a new issue if you have this problem and provide more information. All the "same here" comments do not help us recreate the problem unfortunately, so we have no way to understand the problem.

@prisma prisma locked as off-topic and limited conversation to collaborators Jan 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/regression A reported bug in functionality that used to work before.
Projects
None yet
Development

No branches or pull requests