Skip to content

Node engine, package manager and node modules not available in the run image #164

Description

@musaffa

Expected Behavior

Don't delete node engine, package manager and node_modules from launch layers.

Current Behavior

node-run-script removes node engine, package manager, node_modules from the launch layers. Starting from v0.5, node-run-script has a default script detection. If there's a script named build in package.json, this buildpack will be automatically detected. Thus node engine, package manager and node modules will be removed from the launch layers.

Possible Solution

The presence of a build script doesn't mean that node engine, package manager and node modules will not be needed in the run image anymore. node-run-script should not change the build plan. New env vars can be introduced in order to change the build plan. These env vars can be added to this buildpack or to another buildpack down the layer. Thus developers can choose whether they want to keep node engine, package manager and node modules in the launch layers or not.

Steps to Reproduce

  1. A package.json file with a script named build.

Motivations

This issue may affect NodeJs servers and SSR enabled Front-end applications. In my case, it affects FastBoot enabled Ember applications.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions