question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get config SyntaxError: Unexpected end of JSON input

See original GitHub issue

Steps to reproduce bug

1. Run prisma2 init 2. Select Blank project 3. Select MySQL 4. Select Create new MySQL database (Use default db name) 5. Select Javascript 6. Select Minimal setup (If you choose the “demos” option it will automatically fail)

image

7. Run prisma2 dev

Ouput :

Error: Get config SyntaxError: Unexpected end of JSON input

Side notes

  • I’ve done this multiple times and one thing I notice is that despite selecting “Create new MySQL database” each time (Step 4) it keeps saying there are 4 databases, suggesting that it doesn’t even create a database (This only happens when you leave the database name empty!) image
  • The MySQL logs were unaffected
  • Prisma2 version : prisma2@2.0.0-preview019, binary version: e7579bd35e0938dbf773f1706c098a0d14a5a038
  • Important! - Doesn’t work on current version 2.0.0-preview019, but does work in older version 2.0.0-preview018.2

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pantharshit00commented, Jan 7, 2020

Yes, sorry for the first comment, I misidentified the issue and got into #471 instead.

Can you please list out the exact steps as mentioned by @janpio so that we can reproduce it? Also, you can run the command in debug mode using export DEBUG=* which may provide a more detailed log about the problem.

Related https://github.com/prisma/prisma2/issues/483 which was closed as it was not reproducable but it seems very related to your issue.

0reactions
timsuchanekcommented, Mar 5, 2020

We don’t have prisma2 init anymore and this is aging, so I close it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unexpected end of JSON input Error in JavaScript | bobbyhadz
The "Unexpected end of JSON input" error occurs when trying to parse invalid JSON using the JSON.parse or $.parseJSON methods. Trying to parse...
Read more >
Uncaught SyntaxError: Unexpected end of JSON ... - STechies
A common error encountered by JavaScript programmers is the Uncaught SyntaxError: Unexpected end of JSON input. This is usually observed when the coder...
Read more >
Uncaught SyntaxError: Unexpected end of JSON input at ...
When you try to parse it as JSON it is converted to a string ( "" ), which is empty, so you reach...
Read more >
“Unexpected end of JSON input” – possible fixes - LinuxPip
“Unexpected end of JSON input” (or “Uncaught SyntaxError: Unexpected end of JSON input”) is a common error message in JavaScript, ...
Read more >
Unexpected end of JSON input Error in JavaScript - Stack Diary
The "Unexpected end of JSON input" error is a syntax error that occurs when the JSON you're trying to parse is incomplete or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found