vuejs / vuepress

📝 Minimalistic Vue-powered static site generator
https://vuepress.vuejs.org
MIT License
22.43k stars 4.79k forks source link

SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener' #3218

Open chenkongming opened 1 month ago

chenkongming commented 1 month ago

Bug report

import {addAbortListener} from 'node:events'; ^^^^^^^^^^^^^^^^ SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener' at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21) at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)

Steps to reproduce

node v18.17.1 vuepress 2.0.0-rc.9 vuepress-plugin-search-pro 2.0.0-rc.38

What is expected?

What is actually happening?

Other relevant information

Codestian commented 3 weeks ago

I had the same problem, but solved by using the latest node.js version. I was using 18 which didn't work.

Ajianxian commented 3 days ago

官网写的依赖Node.js v18.16.0+,我用v18.17.0启动项目也报错了,但是升级成v20.10.0就能成功把项目跑起来了 image