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

error: cannot import from modules (env) with --no-modules #21

Closed
kyledecot opened this issue Jun 28, 2022 · 2 comments
Closed

error: cannot import from modules (env) with --no-modules #21

kyledecot opened this issue Jun 28, 2022 · 2 comments

Comments

@kyledecot
Copy link

When attempting to build my application using wasm-pack build -t no-modules --no-typescript I receive the following error:

error: cannot import from modules (`env`) with `--no-modules`
Error: Running the wasm-bindgen CLI
Caused by: failed to execute `wasm-bindgen`: exited with exit status: 1

This appears to be related to rust-lang/rust#93557

If I use v0.2.0 of your library the error goes away however attempting to use the latest ref causes the error.

@alesgenova
Copy link
Owner

Thanks for reporting this!

I did some digging, and it looks like the problem was caused by a dependency that was added after 0.2.0
I removed the dependency and I'm now able to build with the --no-modules option, I hope this will solve the problem for you as well.
The fix is included in the new release 0.3.0 that has just been published.

If you haven't come across it already, I created an example of consuming this library in a wasm app.
The source code of the package that wraps this library and gets build with wasm-bindgen can be found here: https://github.com/alesgenova/pitch-detection-app/tree/master/wasm

@kyledecot
Copy link
Author

I appreciate you looking into this / releasing a fix so quickly 🎉 💯

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