Generation fails with --no-build option

yutahaga
0
yutahaga
commented 7 months ago

Version

ceae48b1fc5566be1cdbe74e989ad4495968f8b5

Reproduction link

https://codesandbox.io/s/6118w7omwz

Steps to reproduce

Run yarn generate.

What is expected ?

Fix fatal error.

What is actually happening?

When I run nuxt generate --no-build, the following error occurs:

FATAL  Cannot read property 'get' of null

  at nuxt.hook (node_modules/@nuxtjs/sitemap/src/index.js:60:32)
  at utils.sequence.fn (node_modules/@nuxt/core/dist/core.js:436:53)
  at promise.then (node_modules/@nuxt/utils/dist/utils.js:1664:43)

Additional comments?

router.extendRoutes are ignored when with --no-build option, so no cache is generated.

bug
0
NicoPennec
1.5k
NicoPennec
commented 7 months ago

Nice catch @yutahaga !

So it's an issue since v1.0.0 :

// CHANGELOG v1.0.0
nuxt generate --no-build: Useful for conditions when just dynamic routes are being changed. This makes incremental builds much faster.

I never used that option. I will inspect to patch that point ASAP ๐Ÿ‘

0
NicoPennec
1.5k
NicoPennec
commented 6 months ago

fix on release v1.0.0

0
Informations
Bug Report โ€ข Open
#c41 - Created 7 months ago