Skip to content

[README]Node版本标记需要更新 #729

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
darkwithlight opened this issue Apr 2, 2025 · 3 comments
Closed

[README]Node版本标记需要更新 #729

darkwithlight opened this issue Apr 2, 2025 · 3 comments

Comments

@darkwithlight
Copy link

当我在使用Node.js v20.* 通过

npm create vue@latest

创建项目时,抛出异常TypeError,其中提到一个Path[0]
目前我已更新使用Node.js v22.14.0,此时才能成功创建项目。

@haoqunjiang
Copy link
Member

我刚用 Node 20.18.1 试了一下,没有异常。你的 Node 版本是多少?

@kennething
Copy link

Doesn't work on node v18.20.2 either, same issue: TypeError [ERR_INVALID_ARG_TYPE]: The "paths[0]" argument must be of type string. Received undefined

@skirtles-code
Copy link

skirtles-code commented Apr 2, 2025

We had someone report this on Vue Land too.

I believe the problem is this line in bundle.js:

const language = await getLanguage(path.resolve(import.meta.dirname, "locales"));

import.meta.dirname was added in Node 20.11.0, https://nodejs.org/en/blog/release/v20.11.0.

haoqunjiang added a commit that referenced this issue Apr 2, 2025
Closes #729

The bug is again related to the CLI code rather than the template -
we need to refactor the CI workflow to test the CLI code in all
environments.
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

No branches or pull requests

4 participants