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

warning: Attempted to import the module #76

Closed
steida opened this issue Nov 25, 2023 · 5 comments
Closed

warning: Attempted to import the module #76

steida opened this issue Nov 25, 2023 · 5 comments

Comments

@steida
Copy link

steida commented Nov 25, 2023

When noble-hashes are used with React Native

warning: Attempted to import the module "/Users/danielsteigerwald/dev/evolu/node_modules/@noble/hashes/crypto.js" which is not listed in the "exports" of "/Users/danielsteigerwald/dev/evolu/node_modules/@noble/hashes". Falling back to file-based resolution. Consider updating the call site or asking the package maintainer(s) to expose this API.

@paulmillr
Copy link
Owner

can you show the exact import of noble that you are using?

@steida
Copy link
Author

steida commented Nov 26, 2023

import { hmac } from "@noble/hashes/hmac";
import { sha512 } from "@noble/hashes/sha512";
import { randomBytes } from "@noble/hashes/utils";

@paulmillr
Copy link
Owner

it's just a warning? is everything working?

@steida
Copy link
Author

steida commented Nov 26, 2023

Yeah, it works. Maybe there's something wrong with Metro. I would wait for the official release - https://metrobundler.dev/docs/package-exports

@paulmillr
Copy link
Owner

i don't think we can do anything here. Crypto is declared in exports.

@paulmillr paulmillr closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2023
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