Skip to content

Update Node.js version requirement to v20.10 or later #58

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

Closed
wants to merge 1 commit into from

Conversation

eucyt
Copy link
Contributor

@eucyt eucyt commented May 7, 2025

To be precise, Node.js needs to be version 20.10 or higher, so I have made the correction.

The with syntax is available in Node.js v20.10 and above. Therefore, if you use v20.9 or below, a runtime error will occur.
https://github.com/line/line-bot-mcp-server/blob/b5c4570dba898dc24c0fd678e413d367e0ec6bb0/src/index.ts
nodejs/node#50140

On the other hand, the older syntax assert has been deprecated since v22, and you need to use with instead.
nodejs/node#52104

In order to support Node.js v22 and above in this repository, we will use with and, as a result, only support Node.js v20.10 or higher.

@eucyt eucyt self-assigned this May 7, 2025
@eucyt eucyt requested a review from a team May 7, 2025 09:27
Copy link
Contributor

Choose a reason for hiding this comment

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

Can't we fully support Node.js v20? If this just wants to read the version, we could create a version.ts instead of relying on package.json. The version can be updated with scripts, so we can update version.ts at the same time. This is simple (and exactly the same approach used by line-bot-sdk-nodejs, with very low maintenance costs).

The advantage of this approach is that it eliminates behavior dependent on the Node.js version and also supports v20.x.y below v20.10. This should be beneficial for users as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree totally.
I'll close this PR and open new PR handling it.
#61

@eucyt
Copy link
Contributor Author

eucyt commented May 8, 2025

Handle this issue in #61

@eucyt eucyt closed this May 8, 2025
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