Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read properties of undefined (reading 'prerender') #392

Closed
MartinX3 opened this issue Jul 8, 2022 · 0 comments
Closed

Cannot read properties of undefined (reading 'prerender') #392

MartinX3 opened this issue Jul 8, 2022 · 0 comments

Comments

@MartinX3
Copy link

MartinX3 commented Jul 8, 2022

Environment

ssr: false,
target: 'static',

and

Nuxt CLI v3.0.0-rc.4                                                                                                                                                           16:03:00
RootDir: /home/developer/verein/rtc-koeln/Rad-Touristik-Club-Koln-e-V-1972.github.io                                                                                           16:03:00
Nuxt project info:                                                                                                                                                             16:03:00

------------------------------
- Operating System: `Linux`
- Node Version:     `v18.5.0`
- Nuxt Version:     `2.16.0-27616340.013f051b`
- Package Manager:  `npm@8.13.0`
- Builder:          `webpack`
- User Config:      `build`, `buildModules`, `components`, `css`, `head`, `modules`, `plugins`, `ssr`, `target`, `serverHandlers`, `devServerHandlers`, `bridge`
- Runtime Modules:  `-`
- Build Modules:    `@nuxtjs/stylelint-module@4.1.0`, `@nuxtjs/vuetify@1.12.3`, `@pinia/nuxt@0.1.9`, `@nuxt/bridge@3.0.0-27621385.6ebdec4`
------------------------------

Reproduction

nuxi generate

Describe the bug

The error output in the logs.

Additional context

Introduced with #324
Probably with 29e180e (#324)
I see
nuxt.options.nitro.prerender?.routes
and
nitro.options.prerender.routes = [...routes]
in the code.

Workaround:
Adding to nuxt.config.js

nitro: {
    prerender: [],
},

Logs

nuxi generate

Nuxt CLI v3.0.0-rc.4                                                                                                                                                        16:01:06
ℹ Production build                                                                                                                                                          16:01:08
ℹ Bundling only for client side                                                                                                                                             16:01:08
ℹ Target: static                                                                                                                                                            16:01:08
ℹ Using components loader to optimize imports                                                                                                                               16:01:08
ℹ Discovered Components: .nuxt/components/readme.md                                                                                                                         16:01:08
✔ Builder initialized                                                                                                                                                       16:01:08

 FATAL  Cannot read properties of undefined (reading 'prerender')                                                                                                           16:01:08

  at node_modules/@nuxt/bridge/dist/chunks/module.mjs:373:45
  at node_modules/hable/dist/hable.js:1:990
  at node_modules/hable/dist/hable.js:1:208
  at async Nuxt.callHook (node_modules/hable/dist/hable.js:1:959)
  at async Builder.resolveRoutes (node_modules/@nuxt/builder-edge/dist/builder.js:408:5)
  at async Promise.all (index 1)
  at async Builder.generateRoutesAndFiles (node_modules/@nuxt/builder-edge/dist/builder.js:289:5)
  at async Builder.build (node_modules/@nuxt/builder-edge/dist/builder.js:259:5)
  at async Object.invoke (node_modules/nuxi/dist/chunks/build.mjs:41:5)
  at async Object.invoke (node_modules/nuxi/dist/chunks/generate.mjs:28:5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant