Open evelant opened 5 months ago
To view this pull requests documentation preview, visit the following URL:
docs.page/invertase/react-native-google-mobile-ads~521
Documentation is deployed and generated using docs.page.
I signed the CLA, not sure why the bot doesn't see it
Thank you :D Awesome you included .ts
support too. You saved my day.
Just occurred to me there's a potential for confusion here if someone uses pnpm
since @expo/config
won't be hoisted to root node_modules by default so it won't get resolved. Not sure there's much that can be done about that, maybe just a note in the docs that they need to explicitly install @expo/config
.
Hello 👋, this PR has been opened for more than 2 months with no activity on it.
If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!
You have 15 days until this gets closed automatically
IDK Why the CLA bot isn't working, I signed the CLA and this is ready to be merged. Any idea @mikehardy ?
@evelant perhaps a mismatch between commit email address and registered github email addresses?
evelant seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
That's all I can think of since evelant
is a github user, but the commits are actually keyed by email IIRC
Hello 👋, this PR has been opened for more than 2 months with no activity on it.
If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing!
You have 15 days until this gets closed automatically
Sorry I haven't had a chance to make the requested changes yet. I'll try to get to it soon.
Should be good to go now @mikehardy. I improved the ambiguous docs and added a descriptive error message if @expo/config fails to resolve for some reason.
Hey! So I'm using this Pull Request for my own app, and it seems like I'm having this error,
is there anything I can do to fix this problem??
@sairam4123 are you using pnpm? If so the lack of hoisting may make it so that implicitly installed @expo/config
cannot be resolved. Try installing @expo/config
explicitly in your package.json
.
Hello, I'm using yarn "1.22.x", and I'm trying to build the Android APK using EAS Build. It seems that it is unable to find googleMobileAdsJson. It seems to work for iOS, only Android doesn't seem to work.
What could be done to fix this issue?
I am also getting this error.
Unable to resolve "./version" from "..\..\node_modules\react-native-google-mobile-ads\src\index.ts"
Could you please help me get this working? This has completely stopped the development of the app. @evelant
Hello @evelant, I'm sorry to let you know but I am currently stuck with this issue which caused the development to grind to an complete stop. I have been facing pressure in the last couple of days from my clients to get the project done in time but this issue is currently a major blocker, could I possibly expect a bug-fix soon?
Thank you so much for your time and effort! 💖
(I am extremely sorry if you find my posts repetitive)
@sairam4123 I'm not sure where that Unable to resolve "./version"
is coming from, I don't think it's related to this PR. It sounds like maybe you have a configuration problem with your EAS build or package.json such that modules aren't getting resolved correctly. Are you using a monorepo structure?
@sairam4123 I'm not sure where that
Unable to resolve "./version"
is coming from, I don't think it's related to this PR. It sounds like maybe you have a configuration problem with your EAS build or package.json such that modules aren't getting resolved correctly. Are you using a monorepo structure?
Yes, I'm using mono repo structure, it seems that version itself is missing from this repo, do we have any options to fix this? Do you have any idea about the failure in the eas build? Waiting for eas to complete a new build.
export const version = "v13.2.0"
adding this works, not sure whether this is even correct, lets see!
@evelant
I'm not really sure. It seems like you've got a module resolution issue due to monorepo hoisting most likely. I'm not a regular maintainer of this package so I don't know the details why it's trying to load that version
module. I just wanted to contribute back the support for expo configs that I added for my own project.
I'd suggest you read the source code here to see why it's trying to load "..\..\node_modules\react-native-google-mobile-ads\src\index.ts"
. That could cause an issue if the path is hard coded as "..\..\node_modules\"
since yarn hoists all of your dependencies to the root of your monorepo. The actual path is probably something like ..\..\..\..\node_modules/react-native-google-mobile-ads\src\index.ts
depending on where it's trying to import from. Check the docs on hoisting with yarn, those should point you in the right direction.
I think I have found the issue, it seems to be an issue with the console.error() because if you see the message more clearly, it says that, it needs ) after the argument list. It could be a possibility that the quotes seem to complete the strings and @expo/config seems to be a some sort of a variable to the compiler
I would love to hear your thoughts on this.
I have been waiting for an update for two months, @evelant could you please merge my pr fixing the above-mentioned issue? Let me know when you do!
Also, please rebase this branch if possible!
Thank you for your help! 💖
Description
Parse expo configs with
@expo/config
. This adds support forapp.config.ts
and makes projects configured with expo conform to the schema for app.config.ts/js.Fixes potential crash in
ios_config.sh
when attempting to parse.js
file as.json
. Minor fixes toapp-json.gradle
.Note: This works on the assumption that
app.config.js/ts
means it's an expo project and safe to load@expo/config
. I'm not aware of any use of these files other than expo.Related issues
Release Summary
feat(expo): improve loading expo configs, support app.config.ts
Checklist
Android
iOS
e2e
tests added or updated in__tests__e2e__
jest
tests added or updated in__tests__
"expo.extra"
for expo projects to conform with expo app.config.ts schema.Test Plan
There aren't any tests for expo configs yet. Tested manually on my production project.
app.config.ts
is resolved and configuration loaded correctly for iOS and Android.Think
react-native-google-mobile-ads
is great? Please consider supporting the project with any of the below:Invertase
on Twitter 🔥