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.

'nuxt dev' breaks on a fresh install with ssr: false

See original GitHub issue

Environment


  • Operating System: Windows_NT
  • Node Version: v16.13.1
  • Nuxt Version: 3.0.0-rc.2
  • Package Manager: yarn@1.22.17
  • Builder: vite
  • User Config: ssr
  • Runtime Modules: -
  • Build Modules: -

Reproduction

https://github.com/mario-neuhold/nuxt3-starter/tree/v3

Describe the bug

nuxt dev is looking for .nuxt/dist/server/server.mjs which does not get created when ssr: false is on, so it crashes.

Workaround:

  • remove ssr: false
  • run nuxt dev - be happy its working (server.mjs got created)
  • add ssr: false again
  • nuxt dev is still working - keep on being happy (server.mjs is still there)

Reproduce:

  • delete .nuxt folder
  • be sure ssr: false is on
  • nuxt dev is not working anymore - be sad
  • start again with Workaround

Additional context

No response

Logs

ERROR Rollup error: Could not load file:///C:/Users/mario/Documents/dev/nuxt3-starter/.nuxt/dist/server/server.mjs: ENOENT: no such file or directory, open 'C:\Users\mario\Documents\dev\nuxt3-starter\file:\C:\Users\mario\Documents\dev\nuxt3-starter\.nuxt\dist\server\server.mjs'

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:16
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
micahltcommented, Jul 6, 2022

This is a pretty critical bug - any updates?

2reactions
849203846commented, Jul 5, 2022

This is a pretty critical bug - any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuxt SSR breaks when updating data values - Stack Overflow
I had a similar error, i fixed it by changing the dynamic component import to the static one.
Read more >
The build Property - Nuxt
Default: true for dev and false for production. Enables CSS Source Map support. devMiddleware. Type: Object. See webpack-dev-middleware for available options ...
Read more >
Server-side rendering with Vue and Nuxt.js - LogRocket Blog
Learn about server-side rendering (SSR) and client-side rendering (CSR), how its evolved, and how to use implement it with Nuxt.js and Vue.
Read more >
Server-Side Rendering with Nuxt.js Application - Medium
asyncData method is a good way to start working with SSR in Nuxt application. ... We have to install new package and register...
Read more >
Nuxt.js for Busy Developers - CODE Magazine
Nuxt.js is a Web development framework that builds on top of the Vue.js framework. It's not a new framework and nor does it...
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