New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imported npm package throws errors within flow #25
Comments
Here is a quick fix if you want to continue to work before that issue gets fixed: Add this to your [ignore]
.*/node_modules/graphql/lib/.* EDIT Nope, it doesn't work. The imported module won't exist anymore for flow... EDIT2 Add this to your cd node_modules/graphql && find . -type f -print0 | xargs -0 sed -i '' 's/@flow//g' This will strip the |
Sorry about this. I will bring this up with the Flow team to get their best advice |
Oh don't worry! I deactivated the error with my small sed regex. It will be On Mon, Jul 6, 2015, 03:28 Lee Byron notifications@github.com wrote:
|
With the recent change to babel, the I'll continue to look into nicer ways to improve this going forward. |
It would be briliant to have flow annotations preserved. For instance in facebook/draft-js they leave the original code in /lib/ and place the generated plain javascript in /build/. |
Since the transformations applied before exporting the package to npm strips the flow annotations but not the comments, a lot of flow errors arise after a
npm install graphql
.Here's some of them:
One solution would be to strip the
/* @flow */
comments from the npm package. But we would lose all of the useful information contained inside those annotations. If we had a transform able to put the annotations in a comment, that would be much better...Anyway, I'm open to discuss the best way to fix this so I can start working on a pull-request and/or a new transform for flow annotations!
The text was updated successfully, but these errors were encountered: