Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Hello World application crashes when export NODE_OPTIONS="--max_old_space_size=4096" is set #1194

Closed

Description

@Samulus

Reproduction steps:

  • echo "console.log('Hello World');" > hi.js
  • export NODE_OPTIONS=--max_old_space_size=4096
  • node hi.js // Prints Hello World as expected.
  • npx pkg hi.js

It prints out:

> [email protected]
> Targets not specified. Assuming:
  node14-linux-x64, node14-macos-x64, node14-win-x64

I run ./hi-linux and nothing is printed, $? shows error code 4 was returned. If we do export NODE_OPTIONS="--max_old_space_size=4096 --trace-exit" and then run ./hi-linux we get the following stack trace:

(node:754642) WARNING: Exited the environment with code 4
    at exit (internal/process/per_thread.js:174:13)
    at _compile (pkg/prelude/bootstrap.js:1682:29)
    at Module._extensions..js (internal/modules/cjs/loader.js:1097:10)
    at Module.load (internal/modules/cjs/loader.js:933:32)
    at Module._load (internal/modules/cjs/loader.js:774:14)
    at runMain (pkg/prelude/bootstrap.js:1739:12)
    at internal/main/run_main_module.js:17:47

I'm using Node v14.16.1 and pkg 5.2.1, let me know if I'm missing any reproduction info.

Activity

  1. github-actions commented on Aug 24, 2021

    @github-actions

    This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label

  2. github-actions commented on Aug 30, 2021

    @github-actions

    This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.

  3. added a commit that references this issue on May 7, 2022
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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions