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

Pin node and npm versions #119

Merged
merged 1 commit into from
Oct 30, 2024
Merged

Pin node and npm versions #119

merged 1 commit into from
Oct 30, 2024

Conversation

jbojcic1
Copy link
Collaborator

This is to make sure all devs are using the same node and npm versions. Strict setting will make the npm command with an incorrect version fail with the appropriate message

@jbojcic1 jbojcic1 requested a review from gudnuf October 30, 2024 09:22
@jbojcic1 jbojcic1 self-assigned this Oct 30, 2024
Copy link

vercel bot commented Oct 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
boardwalk ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 30, 2024 10:18am

@jbojcic1
Copy link
Collaborator Author

Seems like vercel is trying to use version 18. We should update vercel too to make sure the same version is used locally and on hosted envs

@jbojcic1
Copy link
Collaborator Author

Also seems like the max node version supported by aws lambda (and thus vercel) is 20 so we will need to decrease our local versions too.
@gudnuf are you ok with decreasing it locally to v20 (I suggest using nvm to manage node versions locally)?

@jbojcic1
Copy link
Collaborator Author

Actually seems like vercel only supports pinning major version https://vercel.com/docs/functions/runtimes/node-js/node-js-versions#version-overrides-in-package.json. I got the warning on this build:

Screenshot 2024-10-30 at 10 59 34

I don't like that we can't control the exact version but I'll guess we will have to work with it. I'll then update the pr to only specify the major version too

@@ -2,6 +2,10 @@
"name": "quick-cashu",
"version": "0.1.0",
"private": true,
"engines": {
"node": "20.x",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this now means that vercel will always build with latest node version 20 and locally you will be forced to use any version 20. however if you use nvm it will still use 20.18.0 as specified in nvmrc. that way at least dev locally can be in sync

@gudnuf
Copy link
Contributor

gudnuf commented Oct 30, 2024

are you ok with decreasing it locally to v20

yea this is fine

Copy link
Contributor

@gudnuf gudnuf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, thanks!

@gudnuf gudnuf merged commit c6fba75 into main Oct 30, 2024
2 checks passed
@gudnuf gudnuf deleted the chore/pin-node-and-npm-versions branch October 30, 2024 10:34
@gudnuf gudnuf mentioned this pull request Nov 29, 2024
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

Successfully merging this pull request may close these issues.

2 participants