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

[Bug report] vuepress dev docs 启动项目时,报错 #1604

Closed
hmyjyghh opened this issue Aug 29, 2024 · 1 comment
Closed

[Bug report] vuepress dev docs 启动项目时,报错 #1604

hmyjyghh opened this issue Aug 29, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@hmyjyghh
Copy link

Description

用 vuepress dev docs 命令 启动项目时,报错:SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'
image

我看vuepress 官网说需要node环境: [Node.js v18.16.0+] 我用 v18.17.0 也会报错

image
后用了 node 环境: v20.17.0 版本才可以

注意:如果npm 版本过低,比如:
img_v3_02e7_4c8373ec-d9be-4e89-ae47-4d2021c5f9dg

后来使用: npm install -g npm@latest 升级了 npm 版本,目前npm 版本为:[email protected]

声明:我之前安装node.js 的时候,版本比较老,所以自带的npm 版本也比较老,后面我切换 和 安装 node 都是使用的 gnvm, 所以未升级过 npm 版本

Reproduction

123

Used Package Manager

npm

System Info

{
  "name": "new-blog",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "dev": "vuepress dev docs",
    "build": "vuepress build docs",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "@vuepress/bundler-vite": "^2.0.0-rc.15",
    "@vuepress/theme-default": "^2.0.0-rc.42",
    "vuepress": "^2.0.0-rc.15"
  }
}
@meteorlxy
Copy link
Member

meteorlxy commented Aug 31, 2024

Thanks for reporting. One of our dependencies execa has started to require node v18.19.0+. Will update the docs.

@meteorlxy meteorlxy added the documentation Improvements or additions to documentation label Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants