0

In following through the "JS Stack from scratch" guide (now 15 months from its last commit unfortunately) I get to where Flow is installed but when I try to run the tests I get the error ...

Plugin/Preset files are not allowed to export objects, only functions. In /home/glaucon/dev/mtest/node_modules/babel-preset-flow/lib/index.js

In reading around (here, here and here) I have come to understand this is to the underlying stack specified by "JS Stack from scratch" is now incompatible with current versions of Flow.

Unfortunately the links I've provided there are very specific solutions to particular situations (outside of "JS Stack from scratch") where this error is seen and I can't work out how to make use of them in the context of "JS Stack from scratch".

Could someone explain in more general terms what the error is caused by and how I could adopt the instructions to match todays environment ?

Thanks.

skyboyer
  • 22,209
  • 7
  • 57
  • 64
glaucon
  • 8,112
  • 9
  • 41
  • 63
  • I'd suggest instead of running version-less commands like `yarn install flow-bin` look at release dates first with `npm view time` to pick precise version available at that time. https://stackoverflow.com/questions/14982502/how-to-see-package-history – skyboyer Feb 09 '19 at 22:49
  • it would be better having additional filtering in npm. there was [a proposal](https://github.com/npm/npm/issues/12994) on `--time-machine` argument but this ticket is abandoned by now. – skyboyer Feb 09 '19 at 22:51

0 Answers0