Have to keep re-installing, plus jest warnings
See original GitHub issueOccasionally (I haven’t tied down the exact circumstances yet) I get compilation errors suggesting this module is not installed, so I have to install it again. It is registered like this in package.json, because I need v3:
"react-native-document-picker": "git://github.com/Elyx0/react-native-document-picker.git#v3",
(I’ve followed the instructions documented in https://github.com/Elyx0/react-native-document-picker/issues/94)
Also, in running jest tests I’m seeing this warning, I’m not sure if it’s the same problem as above or different:
RNDocumentPicker Native module is not available, make sure you have finished the installation process and rebuilt your app
Also, running jest with --detectOpenHandles is showing this:
Jest has detected the following 1 open handle potentially keeping Jest from exiting:
● TIMERWRAP
at Object.<anonymous> (node_modules/react-native-document-picker/index.js:7:3)
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:11 (3 by maintainers)
Top Results From Across the Web
What do these npm warnings mean when installing Jest in ...
npm WARN burtrandpaulie No README data npm WARN burtrandpaulie No license field. which just says your package.json doesn't have that info.
Read more >Disable Jest Warnings - Today I Learned - TIL @ Hashrocket
Disable Jest Warnings. Jest has a --silent flag that will omit warnings but keep errors: yarn test --silent.
Read more >Avoiding React act warning when accessibility testing next/link ...
First, the act() warning typically doesn't cause Jest tests to fail. It's just a warning. But it, along with other warnings (such as...
Read more >React app testing: Jest and React Testing Library
Learn how to test React applications with Jest and React Testing Library, a popular combination and official recommendation from React.
Read more >How to Test Your Apps using Jest, Testing Library, Cypress ...
Hi everyone! In this article we're going to talk about testing. I'll give you a good overview of what testing is and an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case it helps someone else: I worked around this issue by not
import
-ing the library, and insteadrequire
-ing it just before the code that will actually invoke it. Like this:It’d still be good for that to not be necessary.
Adding this mock in the jest.setup.js file fixed the warning for me.
jest.mock('react-native-document-picker', () => ({ default: jest.fn(), }));