© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
NovuN
Novu•13mo ago•
11 replies
Jay

ERR_REQUIRE_ESM axios error with @novu/node package

I'm using v2.0.6 of the @novu/node package in my express application and when I run the novu.trigger() command, I get the following error:
/Projects/dashboard/node_modules/@novu/node/build/main/lib/novu.js:1
Error [ERR_REQUIRE_ESM]: require() of ES Module /Projects/dashboard/node_modules/@novu/node/node_modules/axios/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Projects/dashboard/node_modules/@novu/node/build/main/lib/novu.js:49:31) {
  code: 'ERR_REQUIRE_ESM'
}
/Projects/dashboard/node_modules/@novu/node/build/main/lib/novu.js:1
Error [ERR_REQUIRE_ESM]: require() of ES Module /Projects/dashboard/node_modules/@novu/node/node_modules/axios/index.js not supported.
Instead change the require of index.js in null to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/Projects/dashboard/node_modules/@novu/node/build/main/lib/novu.js:49:31) {
  code: 'ERR_REQUIRE_ESM'
}

I've worked around this by creating a proxy wrapper around Novu to handle the axios import but is there any better solution? I'm on node v20.15.1
Novu banner
NovuJoin
Open Source Notification Infrastructure Community by Novu
4,169Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Novu Node Setup
NovuNNovu / 💬│support
17mo ago
Axios error on bump novu to 0.13.0
NovuNNovu / 💬│support
3y ago
FCM overrides - @novu/node
NovuNNovu / 💬│support
3y ago
Novu error
NovuNNovu / 💬│support
4y ago