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

Help me guys with the following error #6952

Closed
abdurehmanali611 opened this issue Dec 28, 2024 · 4 comments
Closed

Help me guys with the following error #6952

abdurehmanali611 opened this issue Dec 28, 2024 · 4 comments

Comments

@abdurehmanali611
Copy link

How frequently does the bug occur?

Always

Description

The path is correct but i don't know why i got it

Stacktrace & log output

λ Bundling failed 4963ms node_modules\expo-router\node\render.js (1580 modules)
Web Bundling failed 4998ms node_modules\expo-router\entry.js (1191 modules)

Metro error: Unable to resolve module ../../../prebuilds/node/realm.node from C:\Users\Abdu\Documents\Mobile Apps\vehicle_management\node_modules\realm\dist\platform\node\binding.js:

None of these files exist:
  * node_modules\realm\prebuilds\node\realm.node(.web.ts|.ts|.web.tsx|.tsx|.web.js|.js|.web.jsx|.jsx|.web.json|.json|.web.cjs|.cjs|.web.mjs|.mjs|.web.scss|.scss|.web.sass|.sass|.web.css|.css)
  * node_modules\realm\prebuilds\node\realm.node
  20 | const binding_1 = require("../binding");
  21 | // eslint-disable-next-line @typescript-eslint/no-var-requires
> 22 | const nativeModule = require("../../../prebuilds/node/realm.node");
     |                               ^
  23 | (0, binding_1.injectNativeModule)(nativeModule, { Int64: binding_1.NativeBigInt, WeakRef });
  24 | //# sourceMappingURL=binding.js.map


Call Stack
  <unknown> (node_modules/realm/dist/platform/node/binding.js)
Web Bundled 48ms node_modules\expo-router\_error.js (1 module)

Can you reproduce the bug?

-- select --

Reproduction Steps

No response

Version

expo 52

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

android and web

Build environment

Which debugger for React Native: ..

Cocoapods version

No response

@kraenhansen
Copy link
Member

Your metro resolver config is messed up, causing Metro start reading the binding intended for Node.js.
Can you share your metro.config.js?

@kraenhansen kraenhansen closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
@abdurehmanali611
Copy link
Author

abdurehmanali611 commented Dec 28, 2024 via email

@kraenhansen
Copy link
Member

Ahh, I see it now. It seems you're trying to bundle you app for the web?
Realm JS doesn't support browsers.

@abdurehmanali611
Copy link
Author

abdurehmanali611 commented Dec 28, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants