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

Cannot find module 'react-native-background-task' #83

Open
jdanl89 opened this issue Jul 9, 2020 · 6 comments
Open

Cannot find module 'react-native-background-task' #83

jdanl89 opened this issue Jul 9, 2020 · 6 comments

Comments

@jdanl89
Copy link

jdanl89 commented Jul 9, 2020

After running npm install react-native-background-task --save, I am trying to import BackgroundTask from 'react-native-background-task', but I get Cannot find module 'react-native-background-task' or its corresponding type declarations.

The package was added successfully. I see it in my node_modules and package.json ("react-native-background-task": "^0.2.1",)

@OsamaMukhtar
Copy link

Same issue with me. Did you find a fix for it?

@angelod1as
Copy link

Any solution to this?

@Heltonphg
Copy link

Same issue with me.

@vestronv
Copy link

vestronv commented Sep 2, 2021

Please do npm run react-native run-android or npx react-native run-android after adding any package we need to re-install it on device.

@OsamaElsherif
Copy link

Actually I figured out why that is happening, but I couldn't get a solution for it, yet.
If you go to react-native-background-task project in node_modules foleds, you will find the both of Types,js and Android.js files have a typescript code in it, and if you commented the import and re-typed the file in js Just a few changes, there will not be any errors while using the BackgroundTask

😂😂😂😂😂 But for in the same time the Task didn't worked for me as well, I think we need the both files to be converted to JS, and I will try doing that after finishing the project I am working on.
So if there is another errors and tweaks you'd made, I wish you will tell me.

@fukemy
Copy link

fukemy commented Nov 7, 2022

ok, decided to removed this bad lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants