-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: No loader is configured for ".wasm" files: #1133
Comments
This will be addressed with #1239 |
🙏 Hit this randomly today in a Next.js project on TypeScript and no idea what the cause is: error - ./node_modules/@dqbd/tiktoken/tiktoken_bg.wasm
Module parse failed: Unexpected character '' (1:0)
The module seem to be a WebAssembly module, but module is not flagged as WebAssembly module for webpack.
BREAKING CHANGE: Since webpack 5 WebAssembly is not enabled by default and flagged as experimental feature.
You need to enable one of the WebAssembly experiments via 'experiments.asyncWebAssembly: true' (based on async modules) or 'experiments.syncWebAssembly: true' (like webpack 4, deprecated).
For files that transpile to WebAssembly, make sure to set the module type in the 'module.rules' section of the config (e. g. 'type: "webassembly/async"').
(Source code omitted for this binary file) Hoping the new tiktoken rewrite will remove the issue @dqbd |
it’s great. This bug may be caused by @sveltejs/adapter-cloudflare. Loading wasm locally is no problem., but if wasm is loaded in the imported module, will throw this error. |
Note: this seems to be fixed & merged (to be released later today possible) |
When I use @sveltejs/adapter-cloudflare, as long as I import openai (or other llm) in my project, I get the following error. How can I solve it?
error during build:
Error: Build failed with 1 error:
node_modules/.pnpm/@dqbd+tiktoken@1.0.1/node_modules/@dqbd/tiktoken/tiktoken.js:1:22: ERROR: No loader is configured for ".wasm" files: node_modules/.pnpm/@dqbd+tiktoken@1.0.1/node_modules/@dqbd/tiktoken/tiktoken_bg.wasm
The text was updated successfully, but these errors were encountered: