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

bump Node.js version of netlify #2240

Merged
merged 4 commits into from
Aug 29, 2024
Merged

bump Node.js version of netlify #2240

merged 4 commits into from
Aug 29, 2024

Conversation

uiolee
Copy link
Member

@uiolee uiolee commented Aug 16, 2024

#2238 build failed due to low node version.

log

@github-actions github-actions bot added the infra infrastructure, configuration of this repo label Aug 16, 2024
Copy link
Contributor

Theme thumbnails validation completed.

@uiolee uiolee marked this pull request as draft August 16, 2024 10:04
@SukkaW
Copy link
Member

SukkaW commented Aug 16, 2024

BTW, is it possible to use a string like lts there so that we don't have to manually bump the version?

@uiolee
Copy link
Member Author

uiolee commented Aug 16, 2024

use a string like lts

https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-and-javascript

It looks like we can use any valid string that nvm understands

@tomap tomap marked this pull request as ready for review August 16, 2024 12:27
@uiolee
Copy link
Member Author

uiolee commented Aug 16, 2024

husky not found

https://docs.netlify.com/configure-builds/manage-dependencies/#node-js-environment

If you set the NODE_ENV to production, any devDependencies in your package.json file will not be installed for the build.

Solution: https://typicode.github.io/husky/how-to.html#ci-server-and-docker

commit: e7f7b99

@uiolee uiolee changed the title bump Node.js version of netlify to 20 bump Node.js version of netlify Aug 16, 2024
@SukkaW
Copy link
Member

SukkaW commented Aug 16, 2024

@uiolee Or maybe we should make the husky skip hook setup in CI. We don't commit anything inside the CI after all.

@uiolee
Copy link
Member Author

uiolee commented Aug 16, 2024

@SukkaW Yes. I have commited e7f7b99

@SukkaW SukkaW self-requested a review August 16, 2024 15:21
Copy link
Member

@SukkaW SukkaW left a comment

Choose a reason for hiding this comment

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

Should we add HUSKY=0 to Netlify as well?

https://typicode.github.io/husky/how-to.html#ci-server-and-docker

@uiolee
Copy link
Member Author

uiolee commented Aug 16, 2024

adding HUSKY=0 is acceptable but not required.

when setting NODE_ENV=production, all devDependencies(include husky) will not be installed.

when using e7f7b99, husky and git hooks will not be initialized.

So husky will not be triggered at all. so HUSKY=0 will not have any effect, and of course it has no side effects.

@uiolee uiolee merged commit 994c8c1 into master Aug 29, 2024
6 checks passed
@uiolee uiolee deleted the netlify-node-version branch August 29, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra infrastructure, configuration of this repo
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants