deno icon indicating copy to clipboard operation
deno copied to clipboard

thread 'main' panicked at runtime\worker.rs:701:7

Open joy-stacks opened this issue 1 year ago • 5 comments

NestJs

Platform: windows11 x64 Version: 1.44.2

run deno run --watch -A src/main.ts success image

but run deno compile --output dist/main --target x86_64-pc-windows-msvc src/main.ts run main.exe failed

error message:

thread 'main' panicked at runtime\worker.rs:701:7: Bootstrap exception: TypeError: testEnabled is not a function at init (ext:deno_node/internal/util/debuglog.ts:51:15) at debug (ext:deno_node/internal/util/debuglog.ts:54:5) at logger (ext:deno_node/internal/util/debuglog.ts:69:29) at readableAddChunk (ext:deno_node/_stream.mjs:2797:7) at Readable.push (ext:deno_node/_stream.mjs:2791:14) at initStdin (ext:deno_node/_process/streams.mjs:185:13) at Object.internals.__bootstrapNodeProcess (node:process:652:22) at initialize (ext:deno_node/02_init.js:34:15) at bootstrapMainRuntime (ext:runtime_main/js/99_main.js:873:7) note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at C:\a\deno\deno\runtime\tokio_util.rs:103:36: called Result::unwrap() on an Err value: JoinError::Panic(Id(1), ...) thread 'main' panicked at ext\io\lib.rs:131:38: called Result::unwrap() on an Err value: Os { code: 50, kind: Uncategorized, message: "The request is not supported。" } note: run with RUST_BACKTRACE=1 environment variable to display a backtrace thread 'main' panicked at C:\a\deno\deno\runtime\tokio_util.rs:103:36: called Result::unwrap() on an Err value: JoinError::Panic(Id(1), ...)

joy-stacks avatar Jun 14 '24 08:06 joy-stacks

@joy-stacks thanks for opening the issue. Can you provide steps to reproduce the error?

satyarohith avatar Jun 14 '24 11:06 satyarohith

@satyarohith I think we can trace this down without a reproduction? In the deno_compile case, we are not passing in some flags to the worker setup during bootstrap that causes this "testEnabled is not a function error" during runtime bootstrapping.

lucacasonato avatar Jun 14 '24 19:06 lucacasonato

@joy-stacks thanks for opening the issue. Can you provide steps to reproduce the error?

@satyarohith https://codesandbox.io/p/github/joy-stacks/deno-demo/main

use nssm start-up main.exe

joy-stacks avatar Jun 17 '24 00:06 joy-stacks

Thanks for the reproducible @joy-stacks! The added windows label to the issue as the compiled program works fine on unix platform.

satyarohith avatar Jun 24 '24 06:06 satyarohith

Same error on FreeBSD for both --watch and --unstable-hmr flags as soon as a reload gets triggered and the process was detached via nohup or disown. No error when I use tmux.

Platform: freebsd x86_64
Version: 1.45.2
Args: ["/usr/local/bin/deno", "run", "--unstable-hmr", "-A", "main.ts"]

thread 'main' panicked at runtime/worker.rs:704:7:
Bootstrap exception: TypeError: testEnabled is not a function
    at init (ext:deno_node/internal/util/debuglog.ts:51:15)
    at debug (ext:deno_node/internal/util/debuglog.ts:54:5)
    at logger (ext:deno_node/internal/util/debuglog.ts:69:29)
    at readableAddChunk (ext:deno_node/_stream.mjs:2797:7)
    at Readable.push (ext:deno_node/_stream.mjs:2791:14)
    at initStdin (ext:deno_node/_process/streams.mjs:199:13)
    at Object.internals.__bootstrapNodeProcess (node:process:661:22)
    at initialize (ext:deno_node/02_init.js:34:15)
    at bootstrapMainRuntime (ext:runtime_main/js/99_main.js:860:7)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I know FreeBSD isn't officially supported but this info might be useful.

mpcref avatar Aug 18 '24 18:08 mpcref