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

feat: check node version in next config #1608

Closed
wants to merge 2 commits into from
Closed

Conversation

c-ehrlich
Copy link
Member

✅ Checklist

  • I have followed every step in the contributing guide (updated 2022-10-06).
  • The PR title follows the convention we established conventional-commit
  • I performed a functional test on my final commit

would stop people from running into #1600 (comment)

💯

@changeset-bot
Copy link

changeset-bot bot commented Oct 18, 2023

🦋 Changeset detected

Latest commit: 34f44d7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-t3-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Oct 18, 2023

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

Name Status Preview Updated (UTC)
create-t3-app ✅ Ready (Inspect) Visit Preview Oct 18, 2023 8:19pm
t3-upgrade ✅ Ready (Inspect) Visit Preview Oct 18, 2023 8:19pm

@github-actions github-actions bot added 📌 area: cli Relates to the CLI 📌 area: t3-app Relates to the generated T3 App labels Oct 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

⚡️ Lighthouse report for the changes in this PR:

Category Score
🟢 Performance 92
🟢 Accessibility 100
🟢 Best practices 100
🟢 SEO 100
🔴 PWA 30

Lighthouse ran on https://create-t3-app-git-check-node-version-t3-oss.vercel.app/

@juliusmarminge
Copy link
Member

juliusmarminge commented Oct 18, 2023

I think 18.13 should be fine, if it's the same bug we had for uploadthing with the fetch api

could we not just set the engines field in package json instead?

if (!major || !minor) {
throw new Error(`Unable to parse Node version: ${nodeVersion}`);
}
if (major < 18 || (major === 18 && minor < 6) || (major === 19 && minor < 7)) {
Copy link

@sscotth sscotth Oct 18, 2023

Choose a reason for hiding this comment

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

should this be major === 18 && minor < 16?

Same on cli/template/extras/config/next-config-appdir.mjs

Copy link
Member

Choose a reason for hiding this comment

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

16 is EOL

Copy link

@sscotth sscotth Oct 18, 2023

Choose a reason for hiding this comment

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

I think you misread minor, his check is "<18.6" not "<18.16".

Since you mentioned it, since v19 is also EOL as of 2023-06-01, should we remove v19 all together and check for v20+?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, thanks :)

@c-ehrlich
Copy link
Member Author

I think 18.13 should be fine, if it's the same bug we had for uploadthing with the fetch api

could we not just set the engines field in package json instead?

i dont think its possible to specify multiple versions? 20 is becoming LTR in a few days, so we could just require that, but would probably mean we also need to update docker docs etc

@juliusmarminge
Copy link
Member

I think 18.13 should be fine, if it's the same bug we had for uploadthing with the fetch api
could we not just set the engines field in package json instead?

i dont think its possible to specify multiple versions? 20 is becoming LTR in a few days, so we could just require that, but would probably mean we also need to update docker docs etc

"engines": {
  "node": "^18.16 || ^19.7 || >=20"
}

Doesnt' that work?

@sscotth
Copy link

sscotth commented Oct 18, 2023

Next just bumped their Node version to >=18.17.0 in v13.5.6-canary, bumped to 13.5.7, now it's a major version bump v14.

vercel/next.js#56896
vercel/next.js#56943

@c-ehrlich c-ehrlich closed this Oct 25, 2023
@juliusmarminge juliusmarminge deleted the check-node-version branch November 1, 2023 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📌 area: cli Relates to the CLI 📌 area: t3-app Relates to the generated T3 App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants