You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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-engine buildpack that could install pnpm in the same manner as our heroku/npm-engine buildpack. That would allow us to provide a pnpm installation using engines.pnpm from package.json, or perhaps provide a default pnpm.
Add a check into the heroku/npm-install buildpack to throw an error message if there is lockfile from another package manager (like pnpm-lock.yaml). Something like "Detected pnpm-lock.yaml. If you wish to use pnpm, add packageManager: "[email protected]" to your package.json".
Add a check into the heroku/npm-install buildpack to throw an error message if there isn't a package-lock.json. Something like "We detected npm, but found no package-lock.json. Please run npm i, commit the package-lock.json, and try again".
The text was updated successfully, but these errors were encountered:
For builds that have a
pnpm-lock.yaml
(and no other lockfiles), but don't have apackageManager
field inpackage.json
, the currentheroku/nodejs
buildpack attempts to install dependencies withnpm 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:
heroku/pnpm-engine
buildpack that could installpnpm
in the same manner as ourheroku/npm-engine
buildpack. That would allow us to provide apnpm
installation usingengines.pnpm
frompackage.json
, or perhaps provide a defaultpnpm
.heroku/npm-install
buildpack 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: "[email protected]"
to your package.json".heroku/npm-install
buildpack 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".The text was updated successfully, but these errors were encountered: