Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Builds fail when SSR is false #231

Closed
NCLlamas opened this issue Oct 19, 2021 · 1 comment
Closed

Builds fail when SSR is false #231

NCLlamas opened this issue Oct 19, 2021 · 1 comment
Labels
bridge bug Something isn't working

Comments

@NCLlamas
Copy link

NCLlamas commented Oct 19, 2021

Environment

  • Operating System: Darwin
  • Node Version: v16.11.1
  • Nuxt Version: 2.16.0-27226092.034b9901
  • Package Manager: npm
  • Bundler: Webpack
  • User Config: bridge, ssr, target, head, css, plugins, components, modules, router, axios, pwa, build
  • Runtime Modules: @nuxtjs/emotion@0.1.0, @nuxtjs/axios@5.13.6, @nuxtjs/pwa@3.3.5
  • Build Modules: -

Describe the bug

Building any version of an app with ssr: false in the nuxt.config.ts will fail with a message regarding no such file or directory (looking for server.mjs). The app seems to build fine with SSR: true, but SSR: false will fail with both nuxt generate and nuxt build.

Reproduction

Repository available at: https://github.com/NCLlamas/nuxt-demo-issue

  • Download repository and install dependencies
  • Remove bridge: false from nuxt.config.ts
  • Run npm run generate to see error in terminal
  • Update "build" and "start" scripts based on bridge documentation:
    { "scripts": { "build": "nuxt build", "start": "node .output/server/index.mjs" } }
  • Remove target: static from nuxt.config.ts
  • Run npm run build to see error in terminal

Logs

╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
   │                                                                                                                                                            │
   │   ✖ Nuxt Fatal Error                                                                                                                                       │
   │                                                                                                                                                            │
   │   Error: Could not load /Users/llamas/Documents/Development/hi-there/github-issue-reproduce/node_modules/.cache/nuxt/dist/server/server.mjs (imported by   │
   │   node_modules/@nuxt/nitro/dist/runtime/app/render.mjs): ENOENT: no such file or directory, open                                                           │
   │   '/Users/llamas/Documents/Development/hi-there/github-issue-reproduce/node_modules/.cache/nuxt/dist/server/server.mjs'                                    │
   │                                                                                                                                                            │
   ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
@NCLlamas NCLlamas added bridge bug Something isn't working labels Oct 19, 2021
NCLlamas referenced this issue in NCLlamas/framework Oct 19, 2021
This updates the documentation to reflect a required dependency for TypeScript update. This will resolve the following issues:
https://github.com/nuxt/framework/issues/1248
https://github.com/nuxt/framework/issues/1250
@MrHBS
Copy link

MrHBS commented Oct 19, 2021

Duplicate of #27

@danielroe danielroe transferred this issue from nuxt/framework Apr 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bridge bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants