-
Notifications
You must be signed in to change notification settings - Fork 284
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
[BUG] Failed to compile wasm-bindgen-cli v0.2.95 when exec npx wrangler dev
command
#658
Comments
I think this may be an issue with |
I've been running into a similar issue as well that falls under the umbrella of this issue's title. Pinning wasm-bindgen to version 0.2.93 like OP mentioned fixed the issue. I am using: macOS 15.1 Apple Silicon, Rust v1.82.0, Node v22.10.0, cloudflare-wrangler v3.81.0 (via homebrew) The template used is hello-world (without HTTP) While starting the server, I get: service core:user:example: Uncaught LinkError: WebAssembly.Instance(): Import #9 "./index_bg.js" "__wbg_error_09480e4aadca50ad": function import requires a callable
at null.<anonymous> (shim.js:41:9) My logs:wrangler-2024-10-22_07-04-05_119.log --- 2024-10-22T07:04:05.205Z debug
🪵 Writing logs to "/Users/suhayb/Library/Preferences/.wrangler/logs/wrangler-2024-10-22_07-04-05_119.log"
---
--- 2024-10-22T07:04:05.205Z debug
Failed to load .env file ".env": Error: ENOENT: no such file or directory, open '.env'
at Object.openSync (node:fs:561:18)
at Object.readFileSync (node:fs:445:35)
at tryLoadDotEnv (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:163894:72)
at loadDotEnv (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:163903:12)
at /opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:214085:20
at /opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:179349:16
at maybeAsyncResult (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:177570:44)
at /opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:179348:14
at /opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:177557:22
at Array.reduce (<anonymous>) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '.env'
}
---
--- 2024-10-22T07:04:05.210Z log
⛅️ wrangler 3.81.0
�[38;2;255;136;0m-------------------�[39m
---
--- 2024-10-22T07:04:05.217Z log
Running custom build: cargo install -q worker-build && worker-build --release
---
--- 2024-10-22T07:04:23.319Z debug
Failed to load .env file "/Users/suhayb/Code/Uni/cloud/example/.dev.vars": Error: ENOENT: no such file or directory, open '/Users/suhayb/Code/Uni/cloud/example/.dev.vars'
at Object.openSync (node:fs:561:18)
at Object.readFileSync (node:fs:445:35)
at tryLoadDotEnv (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:163894:72)
at loadDotEnv (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:163903:12)
at getVarsForDev (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:176460:18)
at getBindings (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:215753:10)
at resolveBindings (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:216376:20)
at resolveConfig (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:216461:38)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async #updateConfig (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:216602:30) {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/suhayb/Code/Uni/cloud/example/.dev.vars'
}
---
--- 2024-10-22T07:04:23.328Z debug
No folder available to cache configuration
---
--- 2024-10-22T07:04:23.328Z debug
Metrics dispatcher: Posting data {"type":"event","name":"run dev","properties":{"local":true,"usesTypeScript":false}}
---
--- 2024-10-22T07:04:23.340Z log
The file src changed, restarting build...
---
--- 2024-10-22T07:04:23.340Z log
Running custom build: cargo install -q worker-build && worker-build --release
---
--- 2024-10-22T07:04:24.312Z debug
Writing additional module to output /Users/suhayb/Code/Uni/cloud/example/.wrangler/tmp/dev-ldmW8F/ee96322dafd7709a8fec3dfac4c345ec55adfcfd-index.wasm
---
--- 2024-10-22T07:04:24.313Z debug
RemoteRuntimeController teardown beginning...
---
--- 2024-10-22T07:04:24.313Z debug
RemoteRuntimeController teardown complete
---
--- 2024-10-22T07:04:24.315Z log
�[2m⎔ Starting local server...�[22m
---
--- 2024-10-22T07:04:25.371Z error
�[31m✘ �[41;31m[�[41;97mERROR�[41;31m]�[0m �[1mservice core:user:example: Uncaught LinkError: WebAssembly.Instance(): Import #9 "./index_bg.js" "__wbg_error_53abcd6a461f73d8": function import requires a callable�[0m
at null.<anonymous> (shim.js:41:9)
---
--- 2024-10-22T07:04:25.372Z debug
Error in LocalRuntimeController: Error reloading local server
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at #assembleAndUpdateConfig (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:9853:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Mutex.runWith (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:3627:16)
at async #waitForReady (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:9910:5)
at async #onBundleComplete (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:216775:29)
at async Mutex.runWith (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:3627:16) {
code: 'ERR_RUNTIME_FAILURE',
cause: undefined
}
---
--- 2024-10-22T07:04:25.372Z debug
=> Error contextual data: undefined
---
--- 2024-10-22T07:04:25.373Z log
---
--- 2024-10-22T07:04:25.373Z error
�[31m✘ �[41;31m[�[41;97mERROR�[41;31m]�[0m �[1mThe Workers runtime failed to start. There is likely additional logging output above.�[0m
---
--- 2024-10-22T07:04:25.373Z debug
MiniflareCoreError [ERR_RUNTIME_FAILURE]: The Workers runtime failed to start. There is likely additional logging output above.
at #assembleAndUpdateConfig (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:9853:13)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async Mutex.runWith (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:3627:16)
at async #waitForReady (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:9910:5)
at async #onBundleComplete (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/wrangler-dist/cli.js:216775:29)
at async Mutex.runWith (/opt/homebrew/Cellar/cloudflare-wrangler2/3.81.0/libexec/lib/node_modules/wrangler/node_modules/miniflare/dist/src/index.js:3627:16)
---
--- 2024-10-22T07:04:25.373Z log
�[32mIf you think this is a bug then please create an issue at https://github.com/cloudflare/workers-sdk/issues/new/choose�[0m
---
--- 2024-10-22T07:04:25.386Z debug
[InspectorProxyWorker] handleProxyControllerIncomingMessage {"type":"reloadStart"}
--- |
I believe this is related to the latest Rust v1.82.0, you said you're running. |
Thank you for your response. Downgrading wasm-bindgen helped me. But downgrading Rust to solve the issue is interesting. So we might have 2 culprits (wasm-bindgen version & Rust version). I wonder if they are related in any way. |
I can confirm. It is mostly rust. I down graded to |
Update: latest nightly |
Is there an existing issue for this?
What version of
workers-rs
are you using?0.4.2
What version of
wrangler
are you using?3.81.0
Describe the bug
what I'm experiencing
Failed to compile wasm-bindgen-cli v0.2.95 when I exec
npx wrangler dev
command on mac OS14.6.1Expected behavior
Steps To Reproduce
First Step
I exec
cargo generate cloudflare/workers-rs
.There files are generated.
Cargo.toml
Wrangler.toml
src/lib.rs
Second Step
Next, I exec
npx wrangler dev
.Failed to compile wasm-bindgen-cli v0.2.95.
Tried to avoid errors
I specified the version of
wasm-bindgen
in Cargo.toml and executed thenpx wrangler dev
command and the error does not occured.The text was updated successfully, but these errors were encountered: