Skip to content

process.exit() in ESM results in exit code 13 #40808

Closed

Description

@NMinhNguyen

Version

v16.13.0

Platform

No response

Subsystem

No response

What steps will reproduce the bug?

echo "process.exit()" > test.mjs
node ./test.mjs # this exits with code 13
echo "process.exit()" > test.cjs
node ./test.cjs # this exits with code 0

How often does it reproduce? Is there a required condition?

Seems to only happen when using ES modules.

What is the expected behavior?

The process should exit with code 0.

What do you see instead?

The process exits with code 13.

Additional information

This seems to have been introduced in #34640 to handle unfinished TLA, but in this instance I'm not even using TLA so it seems like a false positive.

Activity

  1. added
    esm
    process
    confirmed-bug
    and removed
    confirmed-bug
    on Nov 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    esmprocess

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions