-
Notifications
You must be signed in to change notification settings - Fork 498
chore: base template align node version with vite 7 #775
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this, but I'll let @haoqunjiang decide if we want to maintain this in sync
I think npm install
and similar commands would already throw on unsupported Node versions when the package manager tries to install vite? If so, we don't need to add this to the template explicitly. It doesn't add any new information to the project, yet it may become a maintenance burden in the future.
I now use Node 18 to run pnpm create vue
to create a project and execute pnpm i
, and no errors or prompts appear. It is not until pnpm dev
is executed that the error appears.
Therefore, if the required node version information is added to package.json, the user can be informed more clearly of the reason.
In fact, after Vite released 7, many people encountered this problem and raised issues.
Thanks. I took some further tests. It seems that pnpm create
doesn't check the engines
field of create-vue
, and pnpm install
ignores those in the dependencies, while npm
warns in both cases.
Including an explicit engines
field in the created project's package.json
is indeed beneficial for users of pnpm
.
Description
sync #774