Get config SyntaxError: Unexpected end of JSON input
See original GitHub issueSteps 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)
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!)
- 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 version2.0.0-preview018.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
We don’t have
prisma2 init
anymore and this is aging, so I close it.