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

@Samulus

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:

> pkg@5.2.1 > 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.

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