Nuxt.js: [2.13] Issue when using nuxt generate --no-build

Created on 12 Jun 2020  ยท  5Comments  ยท  Source: nuxt/nuxt.js

Version

v2.12.2

Reproduction link

https://gitlab.com/jryancasas/nuxtjs-2.13-issue-with-nuxt-generate

Steps to reproduce

Create a new nuxt project, either using [email protected], or by cloning the repo provided. Then:

# install dependencies
$ yarn install

# build for production (target: server by default)
$ yarn nuxt build

# Try to nuxt generate without rebuilding
$ yarn nuxt generate --no-build --port 7777

What is expected ?

Nuxt should be able to generate the website as it does on 2.12

What is actually happening?

i Modern bundles are detected. Modern mode (server) is enabled now.                                                                                                                  19:30:33

 FATAL  In order to use nuxt export, you need to run nuxt build --target static                                                                                                      19:30:34  

  at Generator.initiate (node_modules\@nuxt\generator-edge\dist\generator.js:160:15)


   โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
   โ”‚                                                                                        โ”‚
   โ”‚   โœ– Nuxt Fatal Error                                                                   โ”‚
   โ”‚                                                                                        โ”‚
   โ”‚   Error: In order to use `nuxt export`, you need to run `nuxt build --target static`   โ”‚
   โ”‚                                                                                        โ”‚
   โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

error Command failed with exit code 1.

This bug report is available on Nuxt community (#c10766)
bug-report

Most helpful comment

All 5 comments

CC @Atinux @pi0

Hi :) This should be fixed by #7509

@RyanCasas can you confirm with lastest nuxt-edge?

@RyanCasas can you confirm with lastest nuxt-edge?

It does work with the provided example @Atinux, I still have to try it on more complex scenarios tho. I'll open another issue if that's the case.

Thank you all for your work :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bimohxh picture bimohxh  ยท  3Comments

msudgh picture msudgh  ยท  3Comments

danieloprado picture danieloprado  ยท  3Comments

lazycrazy picture lazycrazy  ยท  3Comments

mattdharmon picture mattdharmon  ยท  3Comments