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:
https://github.com/facebook/metro/blob/af23a1b27bcaaff2e43cb795744b003e145e78dd/packages/metro/src/Server.js#L1028-L1029
I believe this isn't a bigger issue because the react native CLI provides this middleware automatically:
https://github.com/react-native-community/cli/blob/760708fc3216aee565f59877a103a7e35df2d77d/packages/cli-server-api/src/index.ts#L60
Should that middleware be moved down a layer or the code rewritten to not use this field?
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:
Some debugging shows that rawBody is
undefinedand it's trying to be json parsed.There is a comment in the code about not understanding where
rawBodycomes from:https://github.com/facebook/metro/blob/af23a1b27bcaaff2e43cb795744b003e145e78dd/packages/metro/src/Server.js#L1028-L1029
I believe this isn't a bigger issue because the react native CLI provides this middleware automatically:
https://github.com/react-native-community/cli/blob/760708fc3216aee565f59877a103a7e35df2d77d/packages/cli-server-api/src/index.ts#L60
Should that middleware be moved down a layer or the code rewritten to not use this field?