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

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

Open
1 task
chenkongming opened this issue May 29, 2024 · 6 comments

Comments

@chenkongming
Copy link

  • I confirm that this is an issue rather than a question.

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

  • Output of npx vuepress info in my VuePress project:
@Codestian
Copy link

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

@Ajianxian
Copy link

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

@Yongle-Fu
Copy link

same issue in Node.js v20.3.0

@dierkerZebralog
Copy link

Which Node version do I need to install for this to work? 20.16.0 does not work.

@Ajianxian
Copy link

Which Node version do I need to install for this to work? 20.16.0 does not work.

The Node.js version I'm using is v20.10.0. Building with v20.15.0 in GitHub Actions also works successfully. You can try switching the Node.js version or reinstalling a few times to see if that helps.
Snipaste_2024-08-15_09-32-59

@cpres
Copy link

cpres commented Sep 19, 2024

It did not work for me using node v18.17 - worked fine with v20.14

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

6 participants