-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
using with ESlint #120
Comments
Hey, thank you for opening this issue! 🙂 To boost priority on this issue and support open source please tip the team at https://issuehunt.io/r/goatandsheep/react-native-dotenv/issues/120 |
I'll take a proper look later this week but for now try to either add |
This worked for me, @goatandsheep thanks! |
same here when importing google web client ID I also get:
and if I did change module name like @goatandsheep said I get:
but if I import other key it works fine. I am only having this issue with google web client ID. |
@unit-002 is your key in the .env file? Also do not install the library as a dependency only Dev dependency. You may also want to check your babel config in the troubleshooting guide in the wiki |
yes all are in the .env file, the key consist of short numbers and letters only while google client id is very long, I'm not sure if there is a limit number of character but the keys are importing without problem. I am putting them for now in .env for testing purposes. I already have the babel config like this:
|
Huh! I'll add a test. I did a quick search and found this example ID in the docs: |
yes that is how google id looks like |
sorry that isn't it. tests passed despite the longer Google ID. There may be a caching issue? or an issue with how you've configured the .env file. take a look to see how cache clearing is done |
I finally got it working I just deleted all folder in the user directory in my drive C manually all related to cache then rebuild the app and now its working, thanks a lot |
So the cache issue is showing up in every other issue. If this comes up again can you try this and let me know? https://www.npmjs.com/package/react-native-clean-project |
Sure, thanks |
Hi
When i use this line
import { GOOGLE_WEBCLIENTID } from '@env';
I'll face this error from ESlint:
Unable to resolve path to module '@env'.eslintimport/no-unresolved
of course I can use disable for this line eslint. but isn't there a better way?
thanks.
The text was updated successfully, but these errors were encountered: