Open
Description
Do you want to request a feature or report a bug?
Bug 🐛
What is the current behavior?
When running the metro CLI directly there are many errors like:
SyntaxError: Unexpected token u in JSON at position 0
at JSON.parse (<anonymous>)
at node_modules/metro/src/Server.js:1025:28
at Generator.next (<anonymous>)
at asyncGeneratorStep (node_modules/metro/src/Server.js:99:24)
at _next (node_modules/metro/src/Server.js:119:9)
Some debugging shows that rawBody is undefined
and it's trying to be json parsed.
There is a comment in the code about not understanding where rawBody
comes from:
metro/packages/metro/src/Server.js
Lines 1028 to 1029 in af23a1b
I believe this isn't a bigger issue because the react native CLI provides this middleware automatically:
Should that middleware be moved down a layer or the code rewritten to not use this field?