Skip to content
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

Jest coverage is throwing packager errors #12582

Closed
kirkstrobeck opened this issue Feb 25, 2017 · 4 comments
Closed

Jest coverage is throwing packager errors #12582

kirkstrobeck opened this issue Feb 25, 2017 · 4 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@kirkstrobeck
Copy link

Description

What I did

I added Jest to my project and started generating code coverage reports, which creates a folder named "coverage" at the project root.

What you expect to happen

I expected nothing to happen with the code.

What actually happens

Packager is looking at it for some reason, and it is causing an error.

TransformError /PATH/coverage/lcov-report/sort-arrow-sprite.png: Unexpected character '�' (1:0)

Reproduction

Having trouble reproducing.

Solution

The coverage folder should not be included in the packager logic or I should be able to ignore it. It’s unclear why it is looking in there as I have not linked to any files in the folder.

Additional Information

  • React Native version: 0.39.2
  • Platform: iOS
  • Operating System: OS X 10.12.3
@ericvicenti
Copy link
Contributor

cc @cpojer

@kirkstrobeck
Copy link
Author

  • I have since upgraded to 0.41.2 and am still experiencing the issue, so any additional notes may be applicable to only this newer version
  • Tried packager: a way to blacklist some folders/files in a RN app? #7271 (comment) and it didn’t work
  • It throws the error when the coverage report is generated. If I hit reload, I can use my app just fine even though the offending .png is still present. It seems to be that the Packager file watcher is having/starting/causing the issue.

@kirkstrobeck
Copy link
Author

This worked for me http://stackoverflow.com/a/41963217/537998

This still feels like a bug to me, but I’ll close since the issue can be resolved.

@rogerkerse
Copy link
Contributor

this is more like a bug. Quite unintuitive to do this with every react native project

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants