question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`nuxi generate` does not create `.output` directory anymore

See original GitHub issue

Environment

  • Nuxt version: 2.16.0-27358576.777a4b7f
  • @nuxt/bridge version: 3.0.0-27495976.e31c604
  • nitropack version: 0.2.5

Reproduction

As the linked, simple renovate-PR highlights the issue, I don’t think another repro is needed. If it is, feel free to tell me.

Describe the bug

After upgrading @nuxt/bridge I receive the error FATAL [nitro] Please use nuxt generate for static target, which I (kinda) already do (nuxi generate). Later on in the same build I now receive a webpack error originating from @nuxt/bridge, which I can “fix” by adding @nuxt/bridge to the build.transpile array. After doing so tough, there is no .output directory created anymore.

Additional context

Sounds similar to https://github.com/nuxt/framework/issues/4179.

Logs

https://github.com/dargmuesli/jonas-thelemann/runs/5992266520

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jegardinercommented, Apr 28, 2022

I’m also having this problem, although I’ve not added @nuxt/bridge to the build.transpile array.

nuxi generate does not create the .ouput folder, despite mentioning it in it’s success message:

✔ You can now deploy .output/public to any static hosting!

I can use nuxt generate, which outputs to the dist folder as a workaround for now.

1reaction
roseMixcommented, May 9, 2022

Rereading your question, for this workaround to work you need to change your package.json to "generate": "nuxt generate" using the old nuxt command.

Leaving it at nuxi generate tries to output the .output directory and fails because of the bug.

You might also need to add "nuxt": "npm:nuxt-edge" to devDependencies if you get errors about nuxt not being defined.

BTW as an aside, the Bridge Docs say to put the nuxi generate as the script for build not under generate not sure why.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nuxi generate does not create .output directory anymore #32
After upgrading @nuxt/bridge I receive the error FATAL [nitro] Please use nuxt generate for static target , which I (kinda) already do (...
Read more >
Command 'nuxt' not found - Output directory `dist/` does not ...
I have solved the problem. For me it works if I run npm run generate instead of nuxt generate .
Read more >
Nuxt 3 first steps. - ITNEXT
So on one of my machines (MBP) I ran into some problems with Vite — it's reporting some problem with build and Nuxt...
Read more >
Output Directory - Nuxt
Nuxt creates the .output/ directory when building your application for production. You should not touch any files inside since the whole directory will...
Read more >
userguide.pdf - Gradle User Manual
You can install the Gradle build tool on Linux, macOS, or Windows. ... not usable via command line options anymore since Gradle 5.0,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found