Cannot find module 'esbuild' with next.js

Hi, I’m having problems with a deploy on Netlify. My Next.js projects builds and deploy correctly except from one part that uses feed package, when I try to access to feed it always throws this error:

Runtime.ImportModuleError: Error: Cannot find module 'esbuild'
Require stack:
- /var/task/.netlify/functions-internal/next_feeds_atomxml/nextPage/chunks/708.js
- /var/task/.netlify/functions-internal/next_feeds_atomxml/nextPage/webpack-runtime.js
- /var/task/.netlify/functions-internal/next_feeds_atomxml/nextPage/pages/feeds/atom.xml.js
- /var/task/.netlify/functions-internal/next_feeds_atomxml/next_feeds_atomxml.js
- /var/task/next_feeds_atomxml.js
- /var/runtime/UserFunction.js
- /var/runtime/Runtime.js
- /var/runtime/index.js
    at _loadUserApp (/var/runtime/UserFunction.js:221:13)
    at Object.module.exports.load (/var/runtime/UserFunction.js:279:17)
    at Object.<anonymous> (/var/runtime/index.js:43:34)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
    at internal/main/run_main_module.js:17:47

I’m using Next.js 12.1.0

You can see error here:

This the repo: GitHub - freelawproject/ The homepage for Free Law Project the deploy above is from main branch

I also tried to deploy to another site with fix-rss branch here: (I changed atom url in this branch) Here doesn’t throw the error but my feed is empty instead of display the read mdx files from posts folder.

The feed works correctly on local, also loads the post on the feed correctly.

You’re using an outdated and unsupported version of the plugin:

Try updating that.