Search code examples
jsonconfigurationparceljs

parcel2 error with valid JSON: "@parcel/transformer-json:" JSON5: invalid end of input at 1:1


Not sure why I'm getting this error -- I'm using default configuration specs for parcel2, so it should work out of the box according to the documentation.

I've validated the JSON object and it seems to be valid, so this is a bit of a head scratcher.

None of the config/rc files are incorrectly formatted or empty, either.


Solution

  • While the JSON object was valid, the JSON file needed a carriage return (enter at the end of the file) in order to be read correctly by the parcel transformer.