nuxt / content

The file-based CMS for your Nuxt application, powered by Markdown and Vue components.
https://content.nuxt.com
MIT License
3.08k stars 624 forks source link

pnpm build failed nitro-prerenderer cannot be external #2461

Closed putrafajarh closed 9 months ago

putrafajarh commented 9 months ago

Environment


Reproduction

pnpm install pnpm build

Describe the bug

cant build

Additional context

No response

Logs

ℹ Prerendering 1 routes                                                                                                                                nitro 11:38:36 AM
  ├─ /api/_content/cache.1702528706956.json (50ms)                                                                                                      nitro 11:38:36 AM

[nitro 11:38:36 AM]  ERROR  RollupError: Entry module "node_modules/.pnpm/nitropack@2.8.0/node_modules/nitropack/dist/runtime/entries/nitro-prerenderer" cannot be external.

undefined

 ERROR  Entry module "node_modules/.pnpm/nitropack@2.8.0/node_modules/nitropack/dist/runtime/entries/nitro-prerenderer" cannot be external.                   11:38:36 AM

  at error (node_modules/.pnpm/rollup@4.6.0/node_modules/rollup/dist/es/shared/parseAst.js:337:30)
  at ModuleLoader.loadEntryModule (node_modules/.pnpm/rollup@4.6.0/node_modules/rollup/dist/es/shared/node-entry.js:17962:20)
  at async Promise.all (index 0)

 ERROR  Entry module "node_modules/.pnpm/nitropack@2.8.0/node_modules/nitropack/dist/runtime/entries/nitro-prerenderer" cannot be external.                   11:38:36 AM

 ELIFECYCLE  Command failed with exit code 1.
putrafajarh commented 9 months ago

Fixed by update the nitropack pnpm update nitropack@2.8.1

dont know why pnpm dev and build not using same version of nitro

joppehoekstra commented 6 months ago

I'm facing the same issue with nitropack@2.9.4