segment-any-text/wtpsplit

Missing file in NPM package?

Closed this issue · 3 comments

bard commented

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.)

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.

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.

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