"SyntaxError: Unexpected end of JSON input" in wrangler-dist/cli.js
This has happened a few times recently for me, after making some innocuous code changes. Restarting my PC seems to get rid of it, but it's annoying and I'm not sure what's causing it. Anyone any idea? Thanks in advance.
11 Replies
We'd need more info
When are you seeing this error? Any other logs? Can you capture debug logs?
Sorry, here's something to begin with:
What else can I do to provide the necessary info - how do I capture debug logs?
Ok it's on dev, already more helpful
WRANGLER_LOG=debug for debug logs
sec
WRANGLER_LOG=debug
gives "WRANGLER_LOG=debug: The term 'WRANGLER_LOG=debug' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again."
Ah, probably why a system restart fixes itYeah seems to be trying to access the inspector
--no-inspector I think disables it and should avoid the path
--no-inspector
> "Unknown argument: inspector"
With the command: wrangler dev --config \"dev.toml\" --remote --port 1933 --env dev --no-inspector
Seems to be --inspect looking at the code
Ah yes that fixes it. That doesn't show up under the list of options, interestingly. OK with
no-inspect
set, am I losing anything?Just devtools
Cool, thanks for the help.
Much appreciated.