{"id":13478885,"url":"https://github.com/heroku/heroku-buildpack-nodejs","last_synced_at":"2025-05-13T20:22:48.536Z","repository":{"id":1510090,"uuid":"1767089","full_name":"heroku/heroku-buildpack-nodejs","owner":"heroku","description":"Heroku's classic buildpack for Node.js applications.","archived":false,"fork":false,"pushed_at":"2025-04-22T18:43:04.000Z","size":126390,"stargazers_count":1327,"open_issues_count":37,"forks_count":2642,"subscribers_count":121,"default_branch":"main","last_synced_at":"2025-04-22T19:48:03.221Z","etag":null,"topics":["buildpack","heroku","heroku-languages","nodejs"],"latest_commit_sha":null,"homepage":"https://devcenter.heroku.com/categories/nodejs-support","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heroku.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2011-05-18T17:00:45.000Z","updated_at":"2025-04-22T18:43:10.000Z","dependencies_parsed_at":"2023-02-18T15:31:23.376Z","dependency_job_id":"ff9d10f7-833d-41fb-8cde-4daf197cb6f7","html_url":"https://github.com/heroku/heroku-buildpack-nodejs","commit_stats":{"total_commits":1182,"total_committers":65,"mean_commits":"18.184615384615384","dds":0.8291032148900169,"last_synced_commit":"ef9d7a41b31f2b2d2257f864186cc9cf415d4554"},"previous_names":[],"tags_count":278,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fheroku-buildpack-nodejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fheroku-buildpack-nodejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fheroku-buildpack-nodejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heroku%2Fheroku-buildpack-nodejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heroku","download_url":"https://codeload.github.com/heroku/heroku-buildpack-nodejs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251311332,"owners_count":21569008,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["buildpack","heroku","heroku-languages","nodejs"],"created_at":"2024-07-31T16:02:05.175Z","updated_at":"2025-04-28T12:02:13.898Z","avatar_url":"https://github.com/heroku.png","language":"Shell","funding_links":[],"categories":["Shell","Buildpacks \u0026 Runtimes"],"sub_categories":[],"readme":"# Heroku Buildpack for Node.js\n\n![nodejs](https://cloud.githubusercontent.com/assets/51578/13712672/efdf2a40-e792-11e5-82ef-492478cbc0dc.png)\n\nThis is the official [Heroku buildpack](http://devcenter.heroku.com/articles/buildpacks) for Node.js apps.\n\n[![CI](https://github.com/heroku/heroku-buildpack-nodejs/actions/workflows/ci.yml/badge.svg)](https://github.com/heroku/heroku-buildpack-nodejs/actions/workflows/ci.yml)\n\n## Documentation\n\nFor more information about using this Node.js buildpack on Heroku, see these Dev Center articles:\n\n- [Heroku Node.js Support](https://devcenter.heroku.com/articles/nodejs-support)\n- [Getting Started with Node.js on Heroku](https://devcenter.heroku.com/articles/nodejs)\n- [Troubleshooting Node.js Deploys](https://devcenter.heroku.com/articles/troubleshooting-node-deploys)\n\nFor more general information about buildpacks on Heroku:\n\n- [Buildpacks](https://devcenter.heroku.com/articles/buildpacks)\n- [Buildpack API](https://devcenter.heroku.com/articles/buildpack-api)\n\n## Using the Heroku Node.js buildpack\n\nIt's suggested that you use the latest version of the release buildpack. You can set it using the `heroku-cli`.\n\n```sh\nheroku buildpacks:set heroku/nodejs\n```\n\nYour builds will always used the latest published release of the buildpack.\n\nIf you need to use the git url, you can use the `latest` tag to make sure you always have the latest release. **The `main` branch will always have the latest buildpack updates, but it does not correspond with a numbered release.**\n\n```sh\nheroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#latest -a my-app\n```\n\n## Locking to a buildpack version\n\nEven though it's suggested to use the latest release, you may want to lock dependencies - including buildpacks - to a specific version.\n\nFirst, find the version you want from\n[the list of buildpack versions](https://github.com/heroku/heroku-buildpack-nodejs/tags).\nThen, specify that version with `buildpacks:set`:\n\n```\nheroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#v176 -a my-app\n```\n\n### Chain Node with multiple buildpacks\n\nThis buildpack automatically exports node, npm, and any node_modules binaries\ninto the `$PATH` for easy use in subsequent buildpacks.\n\n## Feedback\n\nHaving trouble? Dig it? Feature request?\n\n- [help.heroku.com](https://help.heroku.com/)\n- [GitHub issues](https://github.com/heroku/heroku-buildpack-nodejs/issues)\n\n## Development\n\n### Prerequisites\n\nFor local development, you may need the following tools:\n\n- [Docker](https://hub.docker.com/search?type=edition\u0026offering=community)\n- [Go 1.14](https://golang.org/doc/install#install)\n- [upx](https://upx.github.io/)\n\n### Deploying an app with a fork or branch\n\nTo make changes to this buildpack, fork it on GitHub.\nPush up changes to your fork, then create a new Heroku app to test it,\nor configure an existing app to use your buildpack:\n\n```\n# Create a new Heroku app that uses your buildpack\nheroku create --buildpack \u003cyour-github-url\u003e\n\n# Configure an existing Heroku app to use your buildpack\nheroku buildpacks:set \u003cyour-github-url\u003e\n\n# You can also use a git branch!\nheroku buildpacks:set \u003cyour-github-url\u003e#your-branch\n```\n\n### Downloading Plugins\n\nIn order to download the latest plugins that have been released, run the following:\n\n```\nplugin/download.sh v$VERSION\n```\n\nMake sure the version is in the format `v#`, ie. `v7`.\n\n## Tests\n\nThe buildpack tests use [Docker](https://www.docker.com/) to simulate\nHeroku's stacks.\n\nTo run the test suite:\n\n```\nmake test\n```\n\nOr to just test a specific stack:\n\n```\nmake heroku-20-build\nmake heroku-22-build\n```\n\nThe tests are run via the vendored\n[shunit2](https://github.com/kward/shunit2)\ntest framework.\n\n### Debugging\n\nTo display the logged build outputs to assist with debugging, use the \"echo\" and \"cat\" commands. For example:\n\n```sh\ntest() {\n  local log_file var\n\n  var=\"testtest\"\n  log_file=$(mktemp)\n  echo \"this is the log file\" \u003e \"$log_file\"\n  echo \"test log file\" \u003e\u003e \"$log_file\"\n\n  # use `echo` and `cat` for printing variables and reading files respectively\n  echo $var\n  cat $log_file\n\n  # some cases when debugging is necessary\n  assertEquals \"$var\" \"testtest\"\n  assertFileContains \"test log file\" \"$log_file\"\n}\n```\n\nRunning the test above would produce:\n\n```log\ntesttest\nthis is the log file\ntest log file\n```\n\nThe test output writes to `$STD_OUT`, so you can use `cat $STD_OUT` to read output.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku%2Fheroku-buildpack-nodejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheroku%2Fheroku-buildpack-nodejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheroku%2Fheroku-buildpack-nodejs/lists"}