You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've published an npm package built with wasm-pack, https://github.com/donmccurdy/mikktspace-wasm, and the notable configuration is in its package.json. When trying to use this package in another project (using TypeScript, Webpack, and Svelte) I'm seeing many warnings like these:
error.txt
webpack serve --content-base public
ℹ 「wds」: Project is running at http://localhost:8080/
ℹ 「wds」: webpack output is served from /
ℹ 「wds」: Content not from webpack is served from public
✖ 「wdm」: asset build/bundle.js 531 KiB [emitted] (name: build/bundle) 1 related asset
asset 39f576dd15b04118ab91cb9209690a4b.wasm 32.8 KiB [emitted] [immutable] [from: node_modules/mikktspace/dist/mikktspace_module_bg.wasm] (auxiliary name: build/bundle)
runtime modules 27.1 KiB 14 modules
modules by path ./node_modules/ 443 KiB 42 modules
modules by path ./src/ 5.88 KiB
modules by path ./src/*.css 3.15 KiB
./src/global.css 2.66 KiB [built] [code generated]
./node_modules/css-loader/dist/cjs.js!./src/global.css 498 bytes [built] [code generated]
./src/main.ts 142 bytes [built] [code generated] [1 error]
./src/App.svelte 2.59 KiB [built] [code generated]
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 11:73-91
export 'memory' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 12:46-64
export 'memory' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 52:77-95
export 'memory' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 53:50-68
export 'memory' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 69:73-91
export 'memory' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 70:46-64
export 'memory' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 87:23-59
export '__wbindgen_add_to_stack_pointer' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 88:49-71
export '__wbindgen_malloc' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 90:47-69
export '__wbindgen_malloc' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 92:49-71
export '__wbindgen_malloc' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 94:8-29
export 'generateTangents' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 98:8-28
export '__wbindgen_free' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
WARNING in ./node_modules/mikktspace/dist/mikktspace_module_bg.js 101:8-44
export '__wbindgen_add_to_stack_pointer' (imported as 'wasm') was not found in './mikktspace_module_bg.wasm' (possible exports: default)
@ ./node_modules/mikktspace/dist/mikktspace_module.js 2:0-42 2:0-42
@ ./src/App.svelte 17:0-41 56:13-23 63:34-44
@ ./src/main.ts 2:0-31 3:16-19
I can't seem to get those warnings to go away, even with tsconfig's skipLibCheck. I don't see anything obviously incorrect in the generated type definitions. Attached below, my simple demo project consuming this dependency:
🐛 Bug description
I've published an npm package built with wasm-pack, https://github.com/donmccurdy/mikktspace-wasm, and the notable configuration is in its package.json. When trying to use this package in another project (using TypeScript, Webpack, and Svelte) I'm seeing many warnings like these:
error.txt
I can't seem to get those warnings to go away, even with tsconfig's
skipLibCheck
. I don't see anything obviously incorrect in the generated type definitions. Attached below, my simple demo project consuming this dependency:wasm-pack-repro.zip
🤔 Expected Behavior
TypeScript should compile projects depending on wasm-pack output without warnings, or with a usable way to disable warnings.
👟 Steps to reproduce
From the sample ZIP above, run:
🌍 Your environment
Include the relevant details of your environment.
wasm-pack version: 0.10.0
rustc version: 1.49.0
The text was updated successfully, but these errors were encountered: