Skip to content

fix(ext/node): emit error event for worker with missing main module#32062

Open
littledivy wants to merge 7 commits intodenoland:mainfrom
littledivy:rampage/test-worker-esm-missing-main.js
Open

fix(ext/node): emit error event for worker with missing main module#32062
littledivy wants to merge 7 commits intodenoland:mainfrom
littledivy:rampage/test-worker-esm-missing-main.js

Conversation

@littledivy
Copy link
Member

Fixes test-worker-esm-missing-main.js test

},
});

Deno.test({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now covered by parallel/test-worker-esm-missing-main.js

// "Cannot find module" format so it matches Node.js error behavior.
let e = if internal_handle.worker_type == WorkerThreadType::Node {
let msg = e.to_string();
if msg.starts_with("Module not found") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not great, but I don't have a better idea and it's unlikely we'll ever change this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants