[2.13] Issue when using nuxt generate –no-build



Reproduction link


Steps to reproduce

Create a new nuxt project, either using nuxt-edge@2.13, 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)

1 possible answer(s) on “[2.13] Issue when using nuxt generate –no-build