heroku / heroku/buildpacks-nodejs

Refine the warning displayed when node_modules is detected in the application directory

Open
#736 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
28
Forks
17
Avg merge
1d 16h
Merged PRs (30d)
14

Description

When the `nodejs-npm-install` buildpack runs it's build process, it [checks for the presence of a `node_modules` folder](https://github.com/heroku/buildpacks-nodejs/blob/main/buildpacks/nodejs-npm-install/src/main.rs#L107) in the application directory and emits a warning if the folder is found.

This warning makes sense when the buildpack executes on Heroku since a build is triggered by a Git push and that would indicate the user has checked in `node_modules` into their source control. But, when running `pack` locally, this warning is not required. The check should be refined to:

- not emit the warning if the application directory is not a Git repository
- not emit the warning if the user already has `node_modules` listed in their `.gitignore`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.