Skip to content

Add support for explicitly specifying node entrypoint location #3889

@dastbe

Description

@dastbe

Describe the feature

Similar to how one can specify the runtime via JSII_RUNTIME, there should also be support for providing an explicit location for the node entrypoint with fallback to searching the path.

Use Case

For my particular use case, I'm writing bazel rules to handle executing cdk apps written in arbitrary languages. In this case, manipulating the path to ensure the correct node entrypoint is present and has the correct priority is problematic and non-standard across language_binary targets. By comparison, having an explicit environment variable for setting the node entrypoint would be straightforward to support.

Proposed Solution

Add a JSII_NODE environment variable option to specify the exact location of the node entrypoint. if unset, fallback to existing behavior of environment lookup.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.55.0

Environment details (OS name and version, etc.)

mac/linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions