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
When the package.json has invalid content for fields in the engine, the Checking Node.js versionstep of the buildpack throws an error that says Could not parse package.json. No valid ranges could be parsed at line ... column .... However, when using yarn locally, the installation is successful without any warnings or errors. This could lead to confusion when developers have the same repo config working locally but not on Heroku.
Reproducing Steps
run pack build using heroku-24 builder on a package.json(e.g. this one in Discourse) that has "please-use-yarn" as the content for the field engines.npm.
Expected outcome
The buildpack should either warn the user that there is invalid content more explicitly right before or after the error, provide suggestions for what could possibly be the problem, or ignore the problem and proceed with using yarn (akin to local yarn behavior).
Actual result
===> ANALYZING
Restoring data for SBOM from previous image
===> DETECTING
3 of 5 buildpacks participating
heroku/nodejs-engine 3.2.7
heroku/nodejs-yarn 3.2.7
heroku/ruby 3.0.0
===> RESTORING
===> BUILDING
[Heroku Node.js Engine Buildpack]
[Checking Node.js version]
[Error: Node.js engine package.json error]
Couldn't parse package.json: Could not parse package.json. No valid ranges could be parsed at line 82 column 29
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 51
The text was updated successfully, but these errors were encountered:
When the
package.json
has invalid content for fields in the engine, theChecking Node.js version
step of the buildpack throws an error that saysCould not parse package.json. No valid ranges could be parsed at line ... column ...
. However, when usingyarn
locally, the installation is successful without any warnings or errors. This could lead to confusion when developers have the same repo config working locally but not on Heroku.Reproducing Steps
run
pack build
using heroku-24 builder on apackage.json
(e.g. this one in Discourse) that has "please-use-yarn" as the content for the field engines.npm.Expected outcome
The buildpack should either warn the user that there is invalid content more explicitly right before or after the error, provide suggestions for what could possibly be the problem, or ignore the problem and proceed with using
yarn
(akin to localyarn
behavior).Actual result
The text was updated successfully, but these errors were encountered: