-
Notifications
You must be signed in to change notification settings - Fork 10
Description
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
- 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.