Giter Site home page Giter Site logo

nodejs's Introduction

Paketo Buildpack for Node.js

gcr.io/paketo-buildpacks/nodejs

The Node.js Paketo Buildpack provides a set of collaborating buildpacks that enable the building of a Node.js-based application. These buildpacks include:

The buildpack supports building/running simple Node applications or applications which utilize either NPM or Yarn for managing their dependencies. Support for each of these package managers is mutually exclusive.

Usage examples can be found in the samples repository under the nodejs directory.

The Node.js buildpack is compatible with the following builder(s):

This buildpack also includes the following utility buildpacks:

Check out the Paketo Node.js docs for more information.

nodejs's People

Contributors

accrazed avatar arjun024 avatar dalbar avatar dependabot[bot] avatar dwillist avatar emmjohnson avatar foresteckhardt avatar joshuatcasey avatar joshzarrabi avatar kvedurmu avatar pacostas avatar paketo-bot avatar robdimsdale avatar ryanmoran avatar sophiewigmore avatar thitch97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nodejs's Issues

Upgrade this buildpack to Buildpack API 5

What happened?

  • What were you attempting to do?

I wanted to see that Paketo buildpacks are up to date with the latest CNB Spec for buildpacks.

  • What did you expect to happen?
    I expected to see that in the buildpack.toml for the buildpack, its API version was 0.5 since that's the latest release of the spec.

  • What was the actual behavior? Please provide log output, if possible.
    The actual API version is 0.2 on the main branch of this repo (and in the latest release).

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

  • What buildpacks are you using? Please include versions.

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

Checklist

  • I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.

Upgrade to packit v2

Please upgrade to the latest packit v2 release to enable new features and extended support.

Implement support for BP_NODE_PROJECT_PATH as described in RFC 0003

Requesting implementation of build-time variable$BP_NODE_PROJECT_PATH as described in RFC 0003

Given an app structured as below:

. -> 
   src
      -> nodefiles
          -> package.json
          -> my frontend code
      -> go.mod
      -> main.go  
   dist
      -> hello.js

users should be able to use build-time env variable values BP_NODE_PROJECT_PATH=./src/nodefiles or BP_NODE_PROJECT_PATH=src/nodefiles to set the path that will be considered as the root of the app by nodejs buildpacks.

This will involve changes to all nodejs buildpacks except the yarn buildpack. See issue for a user request.

Error Detect Lifecycle with Base builder version v0.2.26

What happened?

When using the version v.0.26 and above, the below error is getting reported in the Detect lifecycle phase when trying to build using the base builder.

Error:

======== Output: paketo-buildpacks/[email protected] ========

pyproject.toml must include [tool.poetry.dependencies.python], see https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies

err: paketo-buildpacks/[email protected] (1)

======== Output: paketo-buildpacks/[email protected] ========

pyproject.toml must include [tool.poetry.dependencies.python], see https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies

err: paketo-buildpacks/[email protected] (1)

ERROR: No buildpack groups passed detection.

ERROR: failed to detect: buildpack(s) failed with err

*This works fine when using the base builder version v0.2.25.

Below is the output when trying to use base builder version v0.2.25 in detect lifecycle phase

======== Output: paketo-buildpacks/[email protected] ========
pyproject.toml must include [tool.poetry.dependencies.python], see https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies
err: paketo-buildpacks/[email protected] (1)
======== Output: paketo-buildpacks/[email protected] ========
pyproject.toml must include [tool.poetry.dependencies.python], see https://python-poetry.org/docs/pyproject/#dependencies-and-dev-dependencies
err: paketo-buildpacks/[email protected] (1)
6 of 10 buildpacks participating
paketo-buildpacks/ca-certificates 3.1.0
paketo-buildpacks/node-engine 0.12.2
paketo-buildpacks/npm-install 0.8.0
paketo-buildpacks/node-module-bom 0.2.3
paketo-buildpacks/node-run-script 0.3.2
paketo-buildpacks/npm-start 0.8.0

  • What were you attempting to do?

Trying to build Node js angular application in the first phase using node js buildpack and using Nginx build pack to create the final build in Tekton using lifecycle phases.

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

Tekton - v0.33.2 ( tekton-pipelines)

CNB Platform API version - 0.8

  • What buildpacks are you using? Please include versions.

Nodejs
Nginx

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

base builder

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

project Structure

├── README.md
├── angular.json
├── cypress
├── cypress.json
├── karma.conf.js
├── local
├── mime.types
├── nginx-conf.template
├── node_modules
├── pa11yci
├── package-lock.json
├── package.json
├── proxy.conf.json
├── proxyssl.conf.json
├── sonar-project.properties
├── src
├── tsconfig.app.json
├── tsconfig.json
└── tsconfig.spec.json

The buildpacks uses the nodejs buildpacks to build the node app and then tekton step has a logic to re-name the nginx-conf.template to nginx.conf and then run the nginx buildpacks to create the final image.

Node Start Buildpack

In order to implement the Node.js architecture RFC we'll need to implement a Node Start buildpack that sets a start command that uses Node.

After we implement this, we should also update the Language family Buildpack ordering to look something like:

......
[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/node-start"

......

npm install fails if no server.js | app.js | main.js | index.js found in the root 0.17.0

What happened?

  • What were you attempting to do?
  1. Download https://github.com/paketo-buildpacks/samples/tree/main/nodejs/npm
  2. mv server.js src/server.js
  3. Update start script in package.json: "start": "echo "start" && node src/server.js"
  4. Run building
  • What did you expect to happen?
    Successful build (as in gcr.io/paketo-buildpacks/nodejs:0.16)

  • What was the actual behavior? Please provide log output, if possible.

pack build my-app --builder paketobuildpacks/builder:base --buildpack gcr.io/paketo-buildpacks/nodejs -v
Builder paketobuildpacks/builder:base is trusted
Pulling image index.docker.io/paketobuildpacks/builder:base
base: Pulling from paketobuildpacks/builder
Digest: sha256:204eddae19e3f91b44be9ad28922810f93ae5b83f9a30f975934f00f4dabe62f
Status: Image is up to date for paketobuildpacks/builder:base
Selected run image index.docker.io/paketobuildpacks/run:base-cnb
Pulling image index.docker.io/paketobuildpacks/run:base-cnb
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:38199b888e33bed03b98bfed20a091733f502c33ced1a6660ed5c92ed82308ea
Status: Image is up to date for paketobuildpacks/run:base-cnb
Downloading buildpack from image: gcr.io/paketo-buildpacks/nodejs
Pulling image gcr.io/paketo-buildpacks/nodejs
latest: Pulling from paketo-buildpacks/nodejs
Digest: sha256:c18649cacd75e433211a2622b3dce1807eb7e076d827fb253fbb28e9d23a3d0e
Status: Image is up to date for gcr.io/paketo-buildpacks/nodejs:latest
Adding buildpack paketo-buildpacks/nodejs version 0.17.0 to builder
Adding buildpack paketo-buildpacks/node-start version 0.8.0 to builder
Adding buildpack paketo-buildpacks/procfile version 5.1.0 to builder
Adding buildpack paketo-buildpacks/watchexec version 2.3.5 to builder
Adding buildpack paketo-buildpacks/ca-certificates version 3.1.0 to builder
Adding buildpack paketo-buildpacks/environment-variables version 4.1.0 to builder
Adding buildpack paketo-buildpacks/node-engine version 0.12.3 to builder
Adding buildpack paketo-buildpacks/node-module-bom version 0.2.4 to builder
Adding buildpack paketo-buildpacks/npm-start version 0.9.0 to builder
Adding buildpack paketo-buildpacks/node-run-script version 0.3.3 to builder
Adding buildpack paketo-buildpacks/npm-install version 0.9.0 to builder
Adding buildpack paketo-buildpacks/yarn-install version 0.9.0 to builder
Adding buildpack paketo-buildpacks/image-labels version 4.1.0 to builder
Adding buildpack paketo-buildpacks/yarn version 0.6.1 to builder
Adding buildpack paketo-buildpacks/yarn-start version 0.8.0 to builder
Setting custom order
Creating builder with the following buildpacks:
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
-> paketo-buildpacks/[email protected]
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Buildpack paketo-buildpacks/[email protected] already exists on builder with same contents, skipping...
Using build cache volume pack-cache-library_my-app_latest-cbd6ecf04229.build
Running the creator on OS linux with:
Container Settings:
  Args: /cnb/lifecycle/creator -daemon -launch-cache /launch-cache -log-level debug -app /workspace -cache-dir /cache -run-image index.docker.io/paketobuildpacks/run:base-cnb my-app
  System Envs: CNB_PLATFORM_API=0.8
  Image: pack.local/builder/6c616273676b6279696a:latest
  User: root
  Labels: map[author:pack]
Host Settings:
  Binds: pack-cache-library_my-app_latest-cbd6ecf04229.build:/cache /var/run/docker.sock:/var/run/docker.sock pack-cache-library_my-app_latest-cbd6ecf04229.launch:/launch-cache pack-layers-wkkmrxfaxr:/layers pack-app-topujlgoev:/workspace
  Network Mode:
===> ANALYZING
Analyzing image "80dab43240cefaf161ea29cae233b2d2913659ffbe590e3d6431af9e5165464b"
Restoring data for sbom from previous image
Retrieving previous image sbom layer for "sha256:debcbe5b235b338dbcdbf09aff514ebbee0de58715f8846a85fe7d53974c54bd"
Analyzing image "497ee92d82e944a5b4a9e2d9802e9261bf65cf509d07096dbd83a909c98baadd"
===> DETECTING
======== Output: paketo-buildpacks/[email protected] ========
failed
======== Output: paketo-buildpacks/[email protected] ========
expected value from $BP_NODE_RUN_SCRIPTS to be set
======== Output: paketo-buildpacks/[email protected] ========
could not find app in /workspace: expected one of server.js | app.js | main.js | index.js
======== Output: paketo-buildpacks/[email protected] ========
failed
======== Results ========
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
fail: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
fail: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
======== Output: paketo-buildpacks/[email protected] ========
expected value from $BP_NODE_RUN_SCRIPTS to be set
======== Output: paketo-buildpacks/[email protected] ========
could not find app in /workspace: expected one of server.js | app.js | main.js | index.js
======== Results ========
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
fail: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
======== Output: paketo-buildpacks/[email protected] ========
could not find app in /workspace: expected one of server.js | app.js | main.js | index.js
======== Results ========
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
pass: paketo-buildpacks/[email protected]
fail: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
skip: paketo-buildpacks/[email protected]
ERROR: No buildpack groups passed detection.
ERROR: Please check that you are running against the correct path.
ERROR: failed to detect: no buildpacks participating
ERROR: failed to build: executing lifecycle: failed with status code: 20

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
pack --version
0.24.0
  • What buildpacks are you using? Please include versions.
    gcr.io/paketo-buildpacks/nodejs:0.17

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
    paketobuildpacks/builder:base

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

Checklist

  • [+] I have included log output.
  • [+] The log output includes an error message.
  • [+] I have included steps for reproduction.

v0.0.6 manifest.json had unexpected number of entries: 2

Attempted to build this Paketo sample rack app with the command:

pack build rails-rack-app --buildpack gcr.io/paketo-buildpacks/nodejs --buildpack gcr.io/paketo-community/ruby

And got the output:

ERROR: failed to build: opening buildpack blob: extracting buildpack paketo-buildpacks/[email protected] layer (diffID sha256:0c670b1d33c9f41a33ce38fabc8cd69def4379a04c64a09b12b31b0736f263c4): manifest.json had unexpected number of entries: 2

This seems related to this Ruby issue.

Allow users to specify the Node.js source path

It would be helpful to have an environment variable that users can set to specify the base path of their Node.js source code. This would be similar to the BP_GO_TARGETS environment variable that's supported in the Go Buildpack.

Having separate environment variables per language family would be useful for building polyglot apps such as a Go backend and Node.js frontend that might have a structure similar to the following:

src
  -> frontend
      -> package.json
      -> my frontend code
  -> go.mod
  -> main.go   

Unable to run a nodejs project as yarn is not present in path

What happened?

I have an application which requires yarn to start at run time but yarn is not present in the path in the run image.

  • What were you attempting to do?
    Run application called backstage (backstage.io)

  • What did you expect to happen?
    Expected it to run using the yarn start

  • What was the actual behavior? Please provide log output, if possible.
    bash: yarn: command not found

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.
    pack build backstage-buildpack --path . --builder paketobuildpacks/builder:full

  • What buildpacks are you using? Please include versions.
    Was using the packeto nodejs buildpack

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
    paketobuildpacks/builder:full

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?
    package copy.json.txt

Checklist

  • [x ] I have included log output.
  • [x ] The log output includes an error message.
  • [x ] I have included steps for reproduction.

Node.js Language family CNB releases should contain a buildpackage artifact

Context
As buildpackages start to become the standard of shipping our CNBs, we should build a buildpackage of our Paketo language family Node.js CNB. This will make it way easier for users to consume specific language family buildpacks.

Proposal
start publishing a Paketo Node.js buildpackage whenever we ship a new release artifact.

Notes/Helpful Links

  • The pack command that we will have to run to do this is pack package-buildpack <NAME-OF-ARTIFACT> --package-config <Path/To/Package.toml>.
  • An example buildpackage.toml file for the OSS NodeJS CNB. Each uri should be the path to a packaged up meta/implementation CNB.
[buildpack]
uri = "/path/to/nodejs-cnb/nodejs-cnb_package"

[[dependencies]]
uri = "/path/to/npm-cnb/npm-cnb_package"

[[dependencies]]
uri = "/path/to/yarn-cnb/yarn-cnb_package"

[[dependencies]]
uri = "path/to/node-engine-cnb/node-engine-cnb_package"

Acceptance/Deliverables

  • Node.js Language Family CNB github releases should contain an online buildpackage artifact in the release assets.
  • Node.js Buildpackage can be downloaded from Github and used to pack build apps

Add top level [[buildpack.licenses]] field

What happened?

We should add the top level [[buildpack.licenses]] field to buildpack.toml (and all implementation buildpacks) so users can see the buildpack's license through an app image's bill of materials.

Yarn installed in the image of a NodeJS App

Hey there 👋

I have a nodejs app that I built with pack & this buildpack. It has a package.json with the following script:

"start": "yarn run server",

When I try to run this image, it fails with:

bash: yarn: command not found

It looks like yarn isn't installed in the app image. Is it recommended to use something else for starting the app other than the yarn cli when running the image?

Release Paketo NodeJS buildpack

Release in the week of May 17th if relevant changes or dependency updates are merged.

What steps did you take to close this issue? What resources did you use? How long did you spend on this task this week? Answer in a comment.

Automatically configure `NPM_CONFIG_GLOBALCONFIG` with location of a binding of type `npmrc`

Summary

It is not uncommon to want to include secrets in npm configuration. In some cases these secrets cannot be passed via environment variables as they are not stored securely on the platform that is executing the build. Instead, we tell developers that they can use a binding and then specify NPM_CONFIG_GLOBALCONFIG to point to that binding location.

The buildpack could handle this wiring automatically. If a binding is of type npmrc, then it can assign NPM_CONFIG_GLOBALCONFIG to point to that binding location automatically, thus saving developers from having to hardcode this into their build configurations.

Remove buildpack.yml support

Context

With the upcoming removal of Node 10.x line from the buildpack, the maintainers will be releasing a major version (v1.0.0) of the node-engine buildpack as well as this nodejs family buildpack.

As notified here, this also means that all support for buildpack.yml configurations will be removed

Proposal

  • Remove support for buildpack.yml support configurations like node version, optimize-memory switch.
  • Remove/Change all documentation in all READMEs and Paketo docs to reflect that buildpack.yml configurations are not supported.

Node.js Paketo Implementation CNBs should receive dependency updates

Context
We should set up our pipelines to start updating the implementation CNB buildpack.toml anytime there is a dependency bump in an existing version line.

Proposal
OSS Concourse Pipelines should be added to start auto-PRing dependency bumps for existing version lines in implementation Node.js Paketo Buildpacks. If the pipelines pass, the PR should be automatically merged.

Acceptance Criteria
GIVEN there is a new version of any dependency in any of the Node.js Paketo Implementation CNBs
THEN I see that there is a PR to the implementation CNB with the dependency bump
AND when the pipelines pass
THEN I see that the PR has been auto-merged

Notes
Here is a concourse task that used to bump implementation CNB dependencies:
https://github.com/cloudfoundry/buildpacks-ci/tree/ce29842908d77018051422560db38df9fdbfa33c/tasks/cnb/update-cnb-dependency

Default start command doesn't support graceful shutdown

By default, when you build a node app the start command is going to be npm start.

https://github.com/paketo-buildpacks/npm/blob/master/npm/build.go#L112

This results in a process tree for a running app that looks like this:

Dr-No:node-signals dmikusa$ docker exec -it afc ps auxf
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
vcap        31  0.0  0.1  34404  2760 pts/1    Rs+  13:22   0:00 ps auxf
vcap         1  0.0  0.0   1052     4 pts/0    Ss   13:21   0:00 /sbin/docker-in
vcap         6  1.2  2.3 740168 47656 pts/0    Sl+  13:21   0:00 npm
vcap        23  0.0  0.0   4632   784 pts/0    S+   13:21   0:00  \_ sh -c node
vcap        24  0.2  1.6 561804 32780 pts/0    Sl+  13:21   0:00      \_ node ap

You have npm, which starts sh which starts node. Unfortunately, npm doesn't relay SIGTERM to it's child processes and wait for them to stop, so if you issue docker stop on this container it stops immediately and an shutdown hooks registered with process.on() do not fire.

You can test this with the attached sample app.

  • pack build node-signals
  • docker run -it node-signals
  • Then in another terminal run docker stop on the container

You'll see that it exits immediately and you don't see the messages on exit.

If you add --init and -e TINI_KILL_PROCESS_GROUP=1 to the docker run argument, it gets a little better. Sometimes you can see the message logged that the SIGTERM was caught, but it doesn't wait for the full shutdown.

It appears that npm doesn't relay the SIGTERM. It does relay SIGINT, which you can confirm by repeating the test above and using docker kill -s SIGINT. That doesn't help a log though because the default behavior on Kubernetes and Cloud Foundry is to send a SIGTERM followed by a SIGKILL after a certain timeout period.

Having graceful shutdown work out of the box is important. It's expected by developers so, while you can just override the start command with node app.js and get graceful shutdown working, I don't believe that's an OK solution. It should Just Work™.

Any solution that supports graceful shutdown by default would be acceptable. One possibility, would be to pull the start command out of package.json and copy that as the start command. This would a.) fix graceful shutdown and b.) remove npm and an extraneous shell from the list of running processes. Both wins, IMHO.

It appears that npm start isn't doing much, just setting up PATH and running the command so that seems feasible for the buildpack to handle that instead.

node-signals.tar.gz

Implement Paketo RFC 0038: CycloneDX + Syft SBOM

To implement Paketo RFC0038, this buildpack (and the implementation buildpacks inside) will need to move from storing SBOM information in layer metadata to storing it in files that the CNB lifecycle can manipulate during the build. The RFC outlines what these files are and what they should contain.

This issue serves as a meta-issue for work required to complete this work for the Nodejs language family. This will require (link Github issues as they are created):

Trouble with npm start application with builder 0.1.202-base and newer

What happened?

I am building node application.
Up until recently it worked just fine, but with newer builder 0.1.202-base and newer there is an issue.
Build seems to pass but resulting image is crashing:

bash: faas-js-runtime: command not found 

faas-js-runtime is a node module.

  "scripts": {
    "test": "node test/unit.js && node test/integration.js",
    "start": "faas-js-runtime ./index.js",
    "debug": "nodemon --inspect ./node_modules/faas-js-runtime/bin/cli.js ./index.js"
  },

Few observations:

  • If node version is fixed to 14 in package.json then the resulting image works.
    However the application being build works just fine with node 16 locally.
  • If I remove package-lock.json the resulting image works too.
  • If I run locally npm install (which creates node_modules) then the build fails.
    [builder] ERROR: failed to build: exit status 1
    ERROR: failed to build: executing lifecycle. This may be the result of using an untrusted builder: failed with status code: 51
    

Build Configuration

  • I am using pack.

  • What buildpacks are you using? Please include versions.

===> DETECTING
[detector] 5 of 10 buildpacks participating
[detector] paketo-buildpacks/ca-certificates 2.4.2
[detector] paketo-buildpacks/node-engine     0.11.0
[detector] paketo-buildpacks/npm-install     0.6.0
[detector] paketo-buildpacks/node-module-bom 0.2.0
[detector] paketo-buildpacks/npm-start       0.6.0
  • I am using base builder.

Checklist

  • I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.

Implement BOM on installation buildpacks

Summary

As a part of the implementing the Bill of Materials per the RFC in the Node.JS language family, we will have to support BOM creation for the modules installed by both NPM and Yarn in the npm-install and yarn-install buildpacks.

Following investigation, we will move forward with using the CycloneDX Node Module tool within the NPM Install and Yarn Install buildpacks to generate the BOM for those modules.

Tasks

In order to implement this work, we must complete a few tasks.

Acceptance

  • The outcome of this issue should be that there is a BOM available for the Node modules installed by both the NPM Install or Yarn Install buildpacks, and modules that are present in a vendored app.
  • The BOM in all cases should be complete in that it contains entries for all modules in an app.
  • The BOM in both cases should be formatted correctly such that it conforms to paketo-buildpacks/rfcs#57

Yarn Workspaces support

Is there Yarn Workspaces support? If not, I would be happy to provide a minimal sample application I'd like to build.

Cannot override the version of node-engine

What happened?

  • What were you attempting to do?
    When I use a project.toml as shown below, then node-engine:0.5.0 is used, but not the configured node-engine:0.6.0.

  • What did you expect to happen?
    I expected that the version of node-engine can be overridden.

  • What was the actual behavior? Please provide log output, if possible.

pack build juergenzimmermann/buch:1.0.0 --builder paketobuildpacks/builder:base
...
===> DETECTING
5 of 8 buildpacks participating
paketo-buildpacks/ca-certificates 2.3.2
paketo-buildpacks/node-engine     0.5.0
paketo-buildpacks/npm-install     0.4.0
paketo-buildpacks/npm-start       0.3.0
paketo-buildpacks/procfile        4.2.2
...

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you using? Please include a version.
    pack 0.20.0+git-66a4f32.build-2668

  • What buildpacks are you using? Please include versions.
    See above

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
    paketobuildpacks/builder:base

  • Can you provide a sample app or relevant configuration (buildpack.yml, nginx.conf, etc.)?
    project.toml for pack 0.20:

[project]
id = "com.acme.buch"
name = "Microservice buch"
version = "1.0.0"
authors = ["[email protected]"]

[[project.licenses]]
type = "GPL-3.0"

[build]
# fuer Verzeichnis /workspace im Image
include = [
  "/dist/src",
  "/.npmrc",
  "/.slugignore",
  "/Procfile",
  "/package*.json",
  "/project.toml",
]

[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/nodejs:0.6.0"

[[build.buildpacks]]
uri = "gcr.io/paketo-buildpacks/node-engine:0.6.0"

[[build.env]]
name = "BP_NODE_VERSION"
value = "16.4.2"

[[build.env]]
name = "BP_LAUNCHPOINT"
value = "./dist/src/main.js"

[[build.env]]
name = "NODE_VERBOSE"
value = "true"

[[build.env]]
name = "NPM_CONFIG_LOGLEVEL"
value = "verbose"

TypeError with gcr.io/paketo-buildpacks/nodejs:0.7.2

What happened?

Using gcr.io/paketo-buildpacks/nodejs:0.7.1 everything works fine, However, upgrading to gcr.io/paketo-buildpacks/nodejs:0.7.2 I get TypeError: Cannot read property 'integrity' of undefined

  • What were you attempting to do?
    Upgrade from 0.7.1 to 0.7.2

  • What did you expect to happen?
    I expected that my project.toml still works.

  • What was the actual behavior? Please provide log output, if possible.
    Log output:

> pack build juergenzimmermann/buch:1.0.0 --builder paketobuildpacks/builder:base

base: Pulling from paketobuildpacks/builder
Digest: sha256:6c42e7d119ef14742115fb31de8025bb981c7084e3ce4eed3444e3eef9a224cd
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:9cb1909dbe23818f37f91cf9f3cd7d0c2748b6e07c2093169b3fd15591feff27
Status: Image is up to date for paketobuildpacks/run:base-cnb
0.7.2: Pulling from paketo-buildpacks/nodejs
Digest: sha256:33b67cd3e1e4a93b870396d5ff823f6a4bcd20533fea918c7fc32981b30f039a
Status: Image is up to date for gcr.io/paketo-buildpacks/nodejs:0.7.2
===> DETECTING
6 of 9 buildpacks participating
paketo-buildpacks/ca-certificates 2.4.0
paketo-buildpacks/node-engine     0.7.1
paketo-buildpacks/npm-install     0.4.0
paketo-buildpacks/node-module-bom 0.1.1
paketo-buildpacks/npm-start       0.3.0
paketo-buildpacks/procfile        4.3.0
===> ANALYZING
Previous image with name "juergenzimmermann/buch:1.0.0" not found
Restoring metadata for "paketo-buildpacks/node-module-bom:cyclonedx-node-module" from cache
===> RESTORING
Restoring data for "paketo-buildpacks/node-module-bom:cyclonedx-node-module" from cache
===> BUILDING

Paketo CA Certificates Buildpack 2.4.0
  https://github.com/paketo-buildpacks/ca-certificates
  Launch Helper: Contributing to layer
    Creating /layers/paketo-buildpacks_ca-certificates/helper/exec.d/ca-certificates-helper
Paketo Node Engine Buildpack 0.7.1
  Resolving Node Engine version
    Candidate version sources (in priority order):
      BP_NODE_VERSION -> "16.8.0"
      package.json    -> ">=16.8.0"
      <unknown>       -> ""

    Selected Node Engine version (using BP_NODE_VERSION): 16.8.0

  Executing build process
    Installing Node Engine 16.8.0
      Completed in 6.54s

  Configuring build environment
    NODE_ENV     -> "production"
    NODE_HOME    -> "/layers/paketo-buildpacks_node-engine/node"
    NODE_VERBOSE -> "true"

  Configuring launch environment
    NODE_ENV     -> "production"
    NODE_HOME    -> "/layers/paketo-buildpacks_node-engine/node"
    NODE_VERBOSE -> "false"

    Writing profile.d/0_memory_available.sh
      Calculates available memory based on container limits at launch time.
      Made available in the MEMORY_AVAILABLE environment variable.

Paketo NPM Install Buildpack 0.4.0
  Resolving installation process
    Process inputs:
      node_modules      -> "Not found"
      npm-cache         -> "Not found"
      package-lock.json -> "Found"

    Selected NPM build process: 'npm ci'

  Executing build process
    Running 'npm ci --unsafe-perm --cache /layers/paketo-buildpacks_npm-install/npm-cache'
      Completed in 26.487s

  Configuring launch environment
    NPM_CONFIG_LOGLEVEL -> "error"

  Configuring environment shared by build and launch
    PATH -> "$PATH:/layers/paketo-buildpacks_npm-install/modules/node_modules/.bin"


Paketo Node Module Bill of Materials Generator Buildpack 0.1.1
  Resolving CycloneDX Node.js Module version
    Selected CycloneDX Node.js Module version: 3.0.6

  Executing build process
    Installing CycloneDX Node.js Module 3.0.6
      Completed in 182ms

  Configuring environment
    Appending CycloneDX Node.js Module onto PATH

  Running CycloneDX Node.js Module
    Running 'cyclonedx-bom -o bom.json'
failed to run cyclonedx-bom: exit status 1
        /layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/HashList.js:47
              if (lockfile.dependencies[pkg.name].integrity) {
                                                  ^

        TypeError: Cannot read property 'integrity' of undefined
            at HashList.processHashes (/layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/HashList.js:47:43)
            at new HashList (/layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/HashList.js:27:12)
            at new Component (/layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/Component.js:41:22)
            at Bom.createComponent (/layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/Bom.js:75:23)
            at /layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/Bom.js:86:24
            at Array.map (<anonymous>)
            at Bom.createComponent (/layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/Bom.js:86:10)
            at /layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/Bom.js:86:24
            at Array.map (<anonymous>)
            at Bom.createComponent (/layers/paketo-buildpacks_node-module-bom/cyclonedx-node-module/model/Bom.js:86:10)
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51

Build Configuration

project.toml:

[project]
id = "com.acme.buch"
name = "Microservice buch"
version = "1.0.0"
authors = ["[email protected]"]

[build]
include = [
  "/dist/src",
  "!/dist/src/**/*.js.map",
  "!/dist/src/**/*.d.ts",
  "!/dist/src/jest.config.*",
  "/.npmrc",
  "/.slugignore",
  "/Procfile",
  "/package*.json",
  "/project.toml",
  #"/node_modules",
]

[[build.buildpacks]]
# https://console.cloud.google.com/gcr/images/paketo-buildpacks/GLOBAL/nodejs
#uri = "gcr.io/paketo-buildpacks/nodejs:0.7.2"
uri = "gcr.io/paketo-buildpacks/nodejs:0.7.1"

[[build.env]]
name = "BP_NODE_VERSION"
value = "16.8.0"

[[build.env]]
name = "BP_LAUNCHPOINT"
value = "./dist/src/main.js"

[[build.env]]
name = "NODE_VERBOSE"
value = "true"

[[build.env]]
name = "NPM_CONFIG_LOGLEVEL"
value = "verbose"

[[build.env]]
name = "NODE_ENV"
value = "production"

[[build.env]]
name = "NPM_CONFIG_PRODUCTION"
value = "true"
  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.
    pack 0.21.0-rc1

  • What buildpacks are you using? Please include versions.
    See project.toml above.

  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?
    pack with paketobuildpacks/builder:base

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

If needed I can attach my project.

Migrate docs into a Hugo module

In order to locate Paketo documentation closer to the code it documents, we can migrate the docs for this language family from where they currently live in the paketo website repo into a Hugo module that sits inside this repository.

For an example of this, see the Hugo module that sits inside the Paketo Dotnet Core language family repo.

To do this successfully, we need

  • A workflow that automatically tags a release of the docs module when a release is cut on this language family repo. This has been handled in a PR to the centralized Paketo github-config repository
  • A Hugo module inside this language family repo (This module needs to have the name github.com/paketo-buildpacks/<name of this repo>/docs in order for the existing automation to work properly.) It should have the same structure as the Hugo module inside the dotnet-core repo.
  • An additional entry in the go.mod of the paketo-website repo for this repo's docs module
  • An additional [[module.imports.mounts]]in the paketo-website repo's hugo config.toml that mounts the content in this repo's docs module into the proper path in the site's directory structure. That path should match the path to the existing docs file in that repo (Hint: The docs file is probably in here).

Can not run node inside the container

What happened?

I want to access the running docker container and run some scripts inside it, for example running the migrations of the app inside, so I logged into the container docker exec -it container_name /bin/sh and tried to execute that command node -v and got this output:
/bin/sh: 52: node: not found

btw, I can run python and ruby but can not run node or npm commands, and I'm not using either python or ruby in my codebase

  • I wanted to go inside the created container and run node -v

  • I expected that the command would run, assuming we already have nodejs running and will print the nodejs version using the container

  • the output was /bin/sh: 2: node: not found

Build Configuration

*I'm using pack platform

  • What buildpacks are you using? Please include versions.

  • paketobuildpacks/builder:full

Checklist

  • [] I have included log output.
  • The log output includes an error message.
  • I have included steps for reproduction.

Implement rfcs/0001-buildpacks-architecture

This issue breaks down the work for the Node.js Buildpack re-architecture into an ordering that would allow us to implement the proposed changes in the RFC without breaking end users.

    • Create a Tini Buildpack (#179)
    • Implement node-start buildpack. (#188) After this issue ordering looks something like:
......
[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/node-start"

......
    • Create a Yarn Buildpack that provides the dependency (#205)
    • Create a Yarn Start Buildpack (#204)
[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/yarn"

  [[order.group]]
    id = "paketo-buildpacks/yarn-install"

  [[order.group]]
    id = "paketo-buildpacks/tini"

  [[order.group]]
    id = "paketo-buildpacks/yarn-start"
......
[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/node-start"
    • Create a NPM Start Buildpack (#212)
    • Rename NPM buildpack to NPM Install and update NPM Install code to only run npm install (paketo-buildpacks/npm-install#109). After this issue, language family ordering will look like:
[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/yarn"

  [[order.group]]
    id = "paketo-buildpacks/yarn-install"

  [[order.group]]
    id = "paketo-buildpacks/tini"

  [[order.group]]
    id = "paketo-buildpacks/yarn-start"

[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/npm-install"

  [[order.group]]
    id = "paketo-buildpacks/tini"

  [[order.group]]
    id = "paketo-buildpacks/npm-start"

[[order]]

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/node-start"

[Feature Request] Allow disbabling the BOM buildpack when building NodeJS applications

What happened?

The BOM buildpack can take upwards of 50% of the build time for a NodeJS monorepo with Yarn. However, we are not using the bill of materials at all so it would significantly improve the build time if we could disable it.

image

  • What were you attempting to do?

Disable the BOM buildpack with an environment variable

Build Configuration

  • What platform (pack, kpack, tekton buildpacks plugin, etc.) are you
    using? Please include a version.

Pack version 0.23.0+git-0db2c77.build-3056

  • What buildpacks are you using? Please include versions.
7 of 11 buildpacks participating
paketo-buildpacks/ca-certificates 3.0.3
paketo-buildpacks/node-engine     0.12.1
paketo-buildpacks/yarn            0.6.0
paketo-buildpacks/yarn-install    0.8.0
paketo-buildpacks/node-module-bom 0.2.2
paketo-buildpacks/node-run-script 0.3.2
paketo-buildpacks/yarn-start      0.7.1
  • What builder are you using? If custom, can you provide the output from pack inspect-builder <builder>?

paketobuildpacks/builder:full

  • Can you provide a sample app or relevant configuration (buildpack.yml,
    nginx.conf, etc.)?

N/A

RFC for installation buildpack BOM

Per investigation performed in paketo-buildpacks/npm-install#218, we have a viable way to implement the Bill of Materials in the NPM Install and Yarn Install buildpacks.

Since this will involve changes to the buildpacks, we should file an RFC to explain the proposed changes and the implementation details.

Allow users to use a specific version of npm

The current set of buildpacks installs a version of npm based on the chosen version of node. Sometimes users will want to choose a different version of npm than the version that came with the node version they've chosen. We should create a mechanism for users to specify a version of npm to install.

Add Node Module BOM buildpack to order groupings

As a part of #424, once we implement paketo-buildpacks/node-module-bom#1, we should add the newly created Node Module BOM buildpack to each of the three main order groupings in the buildpack.toml as an optional buildpack.

Acceptance

The outcome of this story is that when I use the Node.JS language family buildpack against an NPM app, Yarn app, and a Node app with no package manager, I am able to:

  • see the Node Module BOM buildpack detect
  • see a BOM for all node modules in each app when I run pack inspect-image <image name> --bom for each created image.

Blocking

This issue is blocked on the implementation of paketo-buildpacks/node-module-bom#1

Implement support for running npm scripts

Background

Implement Nodejs RFC 0004: Support running npm scripts. See RFC for details.

Proposal

Step 1: Implement node-run-script buildpack buildpack

  • Create packit based buildpack at the https://github.com/paketo-buildpacks/node-run-script repo

  • API:
    Requires node , node_modules and X; where X is yarn if yarn.lock is present, else npm.
    Provides: None.
    (Edit: API Requirement)

  • Detection:

    • Fail if build-time env var of $BP_NODE_RUN_SCRIPTS not set
    • Fail if package.json is absent
    • Error if any one of comma-separated values of $BP_NODE_RUN_SCRIPTS do not exist in package.json
  • Build:

    • Resolve the correct package-manager from source code.
    • For each script in $BP_NODE_RUN_SCRIPTS=script_1, script_2, ...script_n:
        run npm run-script <script> or yarn run <script> based on the package-manager
  • Pull Request: paketo-buildpacks/node-run-script#1 (Authors: @accrazed @bhh1893)


Step 2: Add node-run-script buildpack to the relevant order groupings in the Nodejs Language Family Buildpack

  • The yarn group should be as follows (version field omitted for brevity):
  [[order.group]]
    id = "paketo-buildpacks/ca-certificates"
    optional = true

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/yarn"

  [[order.group]]
    id = "paketo-buildpacks/yarn-install"
    
  [[order.group]]
    id = "paketo-buildpacks/node-run-script"
    optional = true
    
  [[order.group]]
    id = "paketo-buildpacks/yarn-start"

  [[order.group]]
    id = "paketo-buildpacks/procfile"
    optional = true

  [[order.group]]
    id = "paketo-buildpacks/environment-variables"
    optional = true

  [[order.group]]
    id = "paketo-buildpacks/image-labels"
    optional = true
 
  • The npm group should be as follows (version field omitted for brevity):
   [[order.group]]
    id = "paketo-buildpacks/ca-certificates"
    optional = true

  [[order.group]]
    id = "paketo-buildpacks/node-engine"

  [[order.group]]
    id = "paketo-buildpacks/npm-install"
    
  [[order.group]]
    id = "paketo-buildpacks/node-run-script"
    optional = true
    
  [[order.group]]
    id = "paketo-buildpacks/npm-start"

  [[order.group]]
    id = "paketo-buildpacks/procfile"
    optional = true

  [[order.group]]
    id = "paketo-buildpacks/environment-variables"
    optional = true

  [[order.group]]
    id = "paketo-buildpacks/image-labels"
    optional = true
  • Integration test for the node-run-script use with yarn

  • Integration test for the node-run-script use with npm

  • Pull Request: #417


Step 3: Add related documentation to paketo docs (https://github.com/paketo-buildpacks/paketo-website/tree/main/content)


Step 4: Add samples demonstrating the power of node-run-script buildpack (e.g. Angular, React apps) to samples (https://github.com/paketo-buildpacks/samples/tree/main/nodejs)

Could the Node.js Paketo Buildpack support disabling `yarn install`?

As an app developer, I may want to turn off yarn install, so that my application can be vendored privately, without the yarn Paketo Buildpack checking.

Could we look into separating our Yarn Install Buildpack into a Yarn buildpack that vendors yarn as a dependency and a Yarn Install Buildpack that just runs the yarn install?

Node.js Paketo Language Family Buildpacks should receive implementation buildpack updates

Context
We should set up our pipelines to start updating the language family CNB level buildpack.toml anytime there is a new version of one of its Implementation Paketo Buildpacks.

Proposal
Attempt to use Github Actions to start auto-PRing implementation CNB versions in the Paketo Node.js Language family buildpacks. If pipelines pass, the update PR should be automatically merged.

Acceptance Criteria
GIVEN any implementation CNB in a language family CNB(Node.js) is updated
THEN I see that there is a PR to the language family CNB with the implementation CNB updates
AND when the pipelines pass
THEN I see that the PR has been auto-merged

Notes
Here is a concourse task that is used bump cnb dependencies:
https://github.com/cloudfoundry/buildpacks-ci/tree/ce29842908d77018051422560db38df9fdbfa33c/tasks/cnb/update-cnb-dependency

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.