-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
For builds that have a pnpm-lock.yaml (and no other lockfiles), but don't have a packageManager field in package.json, the current heroku/nodejs buildpack attempts to install dependencies with npm ci. Not only is this using the wrong package manager, it's also attempting to fetch dependencies without a lockfile.
Potentially, there are a few ways to fix this:
- Introduce a
heroku/pnpm-enginebuildpack that could installpnpmin the same manner as ourheroku/npm-enginebuildpack. That would allow us to provide apnpminstallation usingengines.pnpmfrompackage.json, or perhaps provide a defaultpnpm. - Add a check into the
heroku/npm-installbuildpack to throw an error message if there is lockfile from another package manager (likepnpm-lock.yaml). Something like "Detected pnpm-lock.yaml. If you wish to usepnpm, addpackageManager: "pnpm@8.11.0"to your package.json". - Add a check into the
heroku/npm-installbuildpack to throw an error message if there isn't apackage-lock.json. Something like "We detected npm, but found no package-lock.json. Please runnpm i, commit thepackage-lock.json, and try again".
Metadata
Metadata
Assignees
Labels
No labels