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

Android Bundling Failure #39

Closed
justinorringer opened this issue Sep 23, 2022 · 3 comments
Closed

Android Bundling Failure #39

justinorringer opened this issue Sep 23, 2022 · 3 comments

Comments

@justinorringer
Copy link

Hello! We are making a small alarm app for a hackathon using expo/react native.

You all's package works great on the web build, but for running it in expo go we get an Android Bundling error. Since we are making an alarm app, we need to access the android alarm manager. We have tried modifying the metro.config to no avail (following these sorts of threads).

image

The Login page can be found here.

We are planning to work around it with regular api calls, but this nice library would be great to have for similar cases :)

@ganigeorgiev
Copy link
Member

ganigeorgiev commented Sep 23, 2022

The error message indicates that node_modules/pocketbase/dist/pocketbase.es.mjs doesn't exist for some reason.
Could you verify that the file is actually there?

Googling the issue I found this that looks similar to the reported error - react-native-camera/react-native-camera#2626:

Have you checked if the file is in fact there? This normally happens when installing/updating libraries. Just close all your metro bundlers / consoles and start fresh.

@ganigeorgiev
Copy link
Member

If the above suggestion doesn't work, you could also make sure that expo can load .mjs files. Similar issue could be found in portabletext/react-portabletext#6.

I'll close the issue since I don't think we can do anything from our end and it is probably something specific to the local env configuration.

@ganigeorgiev
Copy link
Member

Just for info since this was recently reported in #47, to allow loading the .mjs extension you can create a metro.config.js (if you haven't already) and add the extension to the allowed list:

// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);
config.resolver.sourceExts.push('mjs');
module.exports = config;

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

2 participants