vindennt / Skytrainer

Productivity habit forming app using React Native and mobile gacha game design principles.
1 stars 0 forks source link

Some files are missing #29

Open OhaaCompany opened 7 months ago

OhaaCompany commented 7 months ago

When i ran the app on expo for first time i got the below error:

Unable to resolve asset "./assets/splash.png" from "splash.image" in your app.json or app.config.js Android Bundling failed 2958ms Unable to resolve "../public/images/bust_001.png" from "src\utils\imageMappings.ts"

what should i do?

theres no file in such directory

vindennt commented 7 months ago

Hey Ohaa,

For "Unable to resolve asset "./assets/splash.png" from "splash.image" in your app.json or app.config.js," I would go to app.json and remove the "splash," section. This should resolve the error message since the app does not load with a splash image.

For "Unable to resolve "../public/images/bust_001.png" from "src\utils\imageMappings.ts," it is because the current data includes 53 characters with their id starting at 001, and going to 053. So, 53 images for a bust and icon must be present. imageMappings.ts contains the list of all image files that need to be present, so change those as necessary for your application. For my app, I have icon_001.png to icon_053.png, as well as bust_001.png to bust_053.png present in src/public. You can check src/public.example to see how to name the images. There is also a the gacha banner images which must be named banner_XXX.png and so on, with the XXX being replaced with the id of the banner.

If all missing files are added, then the bundling should succeed. Feel free to let me know if you run into any more issues.

OhaaCompany commented 7 months ago

Hey Ohaa,

For "Unable to resolve asset "./assets/splash.png" from "splash.image" in your app.json or app.config.js," I would go to app.json and remove the "splash," section. This should resolve the error message since the app does not load with a splash image.

For "Unable to resolve "../public/images/bust_001.png" from "src\utils\imageMappings.ts," it is because the current data includes 53 characters with their id starting at 001, and going to 053. So, 53 images for a bust and icon must be present. imageMappings.ts contains the list of all image files that need to be present, so change those as necessary for your application. For my app, I have icon_001.png to icon_053.png, as well as bust_001.png to bust_053.png present in src/public. You can check src/public.example to see how to name the images. There is also a the gacha banner images which must be named banner_XXX.png and so on, with the XXX being replaced with the id of the banner.

If all missing files are added, then the bundling should succeed. Feel free to let me know if you run into any more issues.

Hi I did what you said. Now after I add my supabase url and Supabase anon key, i get a new error as following:

_**_ERROR Error: supabaseUrl is required., js engine: hermes ERROR Invariant Violation: "main" has not been registered. This can happen if:

I checked the node_modules and Supabase npm package is installed and i have renamed the .env.example to .env although still i get the error. How can i solve it?

Thank you!

vindennt commented 7 months ago

Hey Ohaa,

I've run into this problem before, and I'm still not sure of what the definitive fix is but I can give some potential things to try

I'll follow up if I find other potential fixes.

Best of luck!