facebook / flow

Adds static typing to JavaScript to improve developer productivity and code quality.
https://flow.org/
MIT License
22.08k stars 1.86k forks source link

Unhandled exception: Expected an object literal #6995

Closed pronebird closed 5 years ago

pronebird commented 6 years ago

I am not sure how to reproduce this. I've just upgraded to 0.83 just to find flow looping and running out of tries eventually.

The log file contains the following cheesy line:

<<<<<<<<
~/app/node_modules/module-deps/test/invalid_pkg/package.json: Expected an object literal:
Raised by primitive operation at file "set.ml", line 339, characters 38-41
Called from file "set.ml", line 339, characters 28-36
Called from file "set.ml", line 339, characters 28-36
Called from file "set.ml", line 339, characters 28-36
Called from file "set.ml", line 339, characters 28-36
Called from file "set.ml", line 339, characters 28-36
Called from file "set.ml", line 339, characters 28-36
Called from file "src/services/inference/types_js.ml", line 701, characters 4-266
Called from file "src/core/lwt.ml", line 2156, characters 16-20
>>>>>>>>
Unhandled exception: Failure("~/app/node_modules/module-deps/test/invalid_pkg/package.json: Expected an object literal")

It seems the offending JSON is located at ~/app/node_modules/module-deps/test/invalid_pkg/package.json and adding it to [ignore] section solves the problem. However it remains a mystery why Flow goes in there in the first place. Perhaps some 💩 dependency I have causes this? 🤷‍♂️

alexiusp commented 5 years ago

Have the same issue with this dependency. Does anyone going to solve it?

nmote commented 5 years ago

5898