Skip to content
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

Update is_core_module() with node@16 builtinModules. #1749

Merged
merged 4 commits into from
May 27, 2021

Conversation

tmpfs
Copy link
Contributor

@tmpfs tmpfs commented May 26, 2021

This fixes a bug when compiling the asap library which attempted to require('domain').

The domain builtin module did not exist in the list of modules tested in is_core_module() so module resolution failed:

(node:10556) UnhandledPromiseRejectionWarning: Error: load_transformed failed

Caused by:
    0: failed to analyze module
    1: failed to resolve domain from /home/muji/git/consensys/metamask-extension/node_modules/asap/raw.js
    2: not found
(Use `node --trace-warnings ...` to show where the warning was created)
(node:10556) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:10556) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

We updated the list to match that returned by node -p "require('module').builtinModules".

@kdy1 kdy1 merged commit 3359188 into swc-project:master May 27, 2021
@kdy1 kdy1 added this to the v1.2.59 milestone May 27, 2021
@swc-project swc-project locked as resolved and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants