NuxtN
Nuxt12mo ago
30 replies
Josef Trojkař 🔵

addAbortListener import broken on NuxtHub deployment

ISSUE FIXED

- Update all dependencies to newest versions. Especially nuxthub/core and nuxt
- Add an enviroment variable to your deployment either in nuxthub or directly in cloudflare:
Type: text, Name: NODE_VERSION, Value: 23

    [log] [nuxi] Nuxt 3.15.4 with Nitro 2.10.4
19:18:55.348    [error] The requested module 'node:events' does not provide an export named 'addAbortListener'
19:18:55.349      import {addAbortListener} from 'node:events';
19:18:55.349      ^^^^^^^^^^^^^^^^
19:18:55.349      SyntaxError: The requested module 'node:events' does not provide an export named 'addAbortListener'
19:18:55.349      at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
19:18:55.350      at async ModuleJob.run (node:internal/modules/esm/module_job:190:5) 


Constantly fighting with the above error in my nuxthub deployment. Worked fine before but after some package update (unfortunately I am unable to track down specifically which one), this error started occuring on every deployment. Tried changing the node.js version many times to many different versions with no avail. Can't find any answers online. Any ideas?
Was this page helpful?