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

Missing file in NPM package? #27

Closed
bard opened this issue Feb 6, 2021 · 3 comments
Closed

Missing file in NPM package? #27

bard opened this issue Feb 6, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@bard
Copy link

bard commented Feb 6, 2021

I'm trying to import nnsplit in a JavaScript project, and webpack is failing with:

./node_modules/nnsplit/nnsplit.bundle/nnsplit_javascript_bg.wasm
Module not found: Can't resolve './nnsplit_javascript_bg.js' in '/tmp/experiment/node_modules/nnsplit/nnsplit.bundle'

Looking in node_modules/nnsplit/nnsplit.bundle, indeed the file nnsplit_javascript_bg.js is referenced by package.json, but missing from the filesystem.

(Not sure though whether that's the real culprit, as the nodejs example seems to work as intended.)

@bminixhofer
Copy link
Collaborator

This seems to be a valid issue. As you said I think ./nnsplit_javascript_bg.js is missing. The Node.js build is built differently so it is not affected. Not sure why it is not included, I'll look into this.

@bminixhofer bminixhofer added the bug Something isn't working label Feb 9, 2021
@bminixhofer
Copy link
Collaborator

This was rustwasm/wasm-pack#881 (fixed by rustwasm/wasm-pack#839). I'm using a dev version of wasm-pack in CI now, that should fix the issue.

@bminixhofer
Copy link
Collaborator

nnsplit_javascript_bg.js is included as of v0.5.5. Thanks for reporting this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants