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

Unable to resolve module fs #32

Closed
twinedo opened this issue Jul 28, 2020 · 9 comments
Closed

Unable to resolve module fs #32

twinedo opened this issue Jul 28, 2020 · 9 comments
Labels
waiting author response When a ticket has been addressed but you're waiting for the author to confirm the fix.

Comments

@twinedo
Copy link

twinedo commented Jul 28, 2020

I have issue like this:

error: Error: Unable to resolve module fs from node_modules/react-native-dotenv/index.js: fs could not be found within the project.

somebody can help???

@twom
Copy link

twom commented Jul 29, 2020

@goatandsheep and @twinedo
see #20

This seems to stem from not renaming the import from 'react-native-dotenv' to '@env'

Maybe something to put in the migration guide or even a quick FAQ on the Readme.

@goatandsheep goatandsheep added the waiting author response When a ticket has been addressed but you're waiting for the author to confirm the fix. label Jul 30, 2020
@twinedo
Copy link
Author

twinedo commented Jul 31, 2020

Thank you for your response. And sorry for super late response.
I have solve this issue by install module fs, then setup babel.config.js like read.md..
Thank you all 🙏

@goatandsheep
Copy link
Owner

@twinedo awesome! I'm so glad we were able to resolve this. You said you installed fs as an additional module? As in you used the fs built into node or a different npm module?

@twinedo
Copy link
Author

twinedo commented Jul 31, 2020

i use yarn. when i check folder node_modules, there is no fs module. I don't why. So i install it 😁

@goatandsheep
Copy link
Owner

Well I'm happy it worked for you. fs is an empty module 🤡 I'm going to close this. let me know if I need to reopen.

@cengit
Copy link

cengit commented Nov 13, 2020

I had same issue after upgrade react-native-dotenv.
solution: make sure all import { xxx } from 'react-native-dotenv'; change to import { xxx } from '@env';

@stevus
Copy link

stevus commented Dec 30, 2022

Yea too bad this isn't documented properly. It's misleading to think we've got an option to not set the modulename.

@stevus
Copy link

stevus commented Dec 30, 2022

listing this as a dev dependency does nothing to resolve the issue as stated in #20

@goatandsheep
Copy link
Owner

Feel free to open a PR if you have any documentation suggestions. I update the docs every few months including all suggestions. Saying it's bad unfortunately doesn't help. This is an old ticket so please continue at #392 . Locking.

Repository owner locked and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting author response When a ticket has been addressed but you're waiting for the author to confirm the fix.
Projects
None yet
Development

No branches or pull requests

6 participants
@twom @stevus @cengit @goatandsheep @twinedo and others