Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heroku: use nodejs buildpack to specify version of node and yarn #2498

Closed
jrochkind opened this issue Jan 17, 2024 · 1 comment
Closed

Heroku: use nodejs buildpack to specify version of node and yarn #2498

jrochkind opened this issue Jan 17, 2024 · 1 comment
Assignees

Comments

@jrochkind
Copy link
Contributor

jrochkind commented Jan 17, 2024

Similar to what was going on with python in #2436, we're letting heroku pick the version of node and yarn installed, which some months ago heroku changed to deprecated behavior.

They want us to use the nodejs buidpack and specify the exact version of node and yarn we want. In this case we SHOULD be able to specify a range of versions, like "latest 10.1.x", which is probably what we want to do.

But it still does mean we'll have to periodically manually update these version numbers, when we are using a too-old (EOL etc) version.

But this is what heroku wants, we should use heroku recommended setup.

We will want to pay attention to how it effects our heroku "slug size". If it increases it too much, it could be a problem. Heroku max slug size is 500MB and it starts warning you at some number under that. (350?). Bigger slug size means slower deploy too. We want to avoid even the warning. As of this writing, our slug size is....

remote: -----> Compressing...
remote:        Done: 256.3M

(most of our slug size is node packages! That may not be needed at runtime, just at asset compile time. We could find a way to trim them. Anyway, a separate issue!)

Currently we get these deprecations on deploy.

remote: ###### WARNING:
remote:
remote:        Installing a default version (1.22.19) of Yarn
remote:        This version is not pinned and can change over time, causing unexpected failures.
remote:
remote:        Heroku recommends placing the `heroku/nodejs` buildpack in front of the `heroku/ruby`
remote:        buildpack as it offers more comprehensive Node.js support, including the ability to
remote:        customise the Node.js version:
remote:
remote:        https://devcenter.heroku.com/articles/ruby-support#node-js-support
remote:
remote:
remote: ###### WARNING:
remote:
remote:        Installing a default version (20.9.0) of Node.js.
remote:        This version is not pinned and can change over time, causing unexpected failures.
remote:
remote:        Heroku recommends placing the `heroku/nodejs` buildpack in front of
remote:        `heroku/ruby` to install a specific version of node:
remote:
remote:        https://devcenter.heroku.com/articles/ruby-support#node-js-support
remote:
@jrochkind
Copy link
Contributor Author

@eddierubeiz this is another straightforward fairly quick one that needs doing, if you wind up with extra time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants