Home
Support Forums

[Next.js] atom.xml and sitemap.xml

I try to build my site with Next.js and was almost done except atom.xml and sitemap.xml.
My site’s atom.xml and sitemap.xml throw errors like this.

{"errorType":"Runtime.ImportModuleError","errorMessage":"Error: Cannot find module 'esbuild'\nRequire stack:\n- /var/task/.netlify/functions-internal/next_atomxml/nextPage/chunks/637.js\n- /var/task/.netlify/functions-internal/next_atomxml/nextPage/pages/atom.xml.js\n- /var/task/.netlify/functions-internal/next_atomxml/next_atomxml.js\n- /var/task/next_atomxml.js\n- /var/runtime/UserFunction.js\n- /var/runtime/index.js","trace":["Runtime.ImportModuleError: Error: Cannot find module 'esbuild'","Require stack:","- /var/task/.netlify/functions-internal/next_atomxml/nextPage/chunks/637.js","- /var/task/.netlify/functions-internal/next_atomxml/nextPage/pages/atom.xml.js","- /var/task/.netlify/functions-internal/next_atomxml/next_atomxml.js","- /var/task/next_atomxml.js","- /var/runtime/UserFunction.js","- /var/runtime/index.js","    at _loadUserApp (/var/runtime/UserFunction.js:100:13)","    at Object.module.exports.load (/var/runtime/UserFunction.js:140:17)","    at Object.<anonymous> (/var/runtime/index.js:43:30)","    at Module._compile (internal/modules/cjs/loader.js:999:30)","    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)","    at Module.load (internal/modules/cjs/loader.js:863:32)","    at Function.Module._load (internal/modules/cjs/loader.js:708:14)","    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)","    at internal/main/run_main_module.js:17:47"]}

How can I fix it?

Hey there, @yjimbo :wave:

Thanks for reaching out. Can you please share your site name as well as your public repo for the project?

Hi @hillary,

Thanks for replying!

This is my website and repo.

These URLs throw errors.
https://jmblog.jp/atom.xml
https://jmblog.jp/sitemap.xml

Hi @yjimbo,

Does this help:

1 Like

Hi @hrishikesh,

Thanks for your information. Yes, it seems the same issue. I’ll follow the thread.