Skip to content

Build fails with SSR turned off #27

Closed
@francisfontoura

Description

@francisfontoura

Environment

  • Operating System: Linux
  • Node Version: v14.18.0
  • Nuxt Version: 2.16.0-27226092.034b9901
  • Package Manager: Yarn
  • Bundler: Webpack
  • User Config: ssr, buildModules
  • Runtime Modules: -
  • Build Modules: @nuxt/bridge@3.0.0-27234503.d5127e9

Describe the bug and expected behavior

nuxi build fails with ssr: false. Output:

start Building server...                                                                                                                                               00:26:02

 ERROR  Rollup error: Could not load .nuxt/dist/server/server.mjs (imported by node_modules/@nuxt/nitro/dist/runtime/app/render.mjs): ENOENT: no such file or directory, open '.nuxt/dist/server/server.mjs'


 ERROR  Nuxt Build Error: Could not load .nuxt/dist/server/server.mjs (imported by node_modules/@nuxt/nitro/dist/runtime/app/render.mjs): ENOENT: no such file or directory, open '.nuxt/dist/server/server.mjs'

Steps to reproduce

  1. Set ssr: false in nuxt.config.ts.
  2. Run (npx) nuxi build in shell.

Additional context

My project doesn't need SSR, but needs "runtime config" with environment variables injected by Node.js.

Activity

tkofh

tkofh commented on Oct 27, 2021

@tkofh

This is also the case for Nuxt 3 (not bridge), should that be its own issue?

beocaca

beocaca commented on Nov 10, 2021

@beocaca
victorberland

victorberland commented on Nov 16, 2021

@victorberland

Considering this issue has been open for more than a month now without any progress on the matter, does anyone maybe know of a temporary fix that may work?

AllInOneYT

AllInOneYT commented on Nov 16, 2021

@AllInOneYT

Considering this issue has been open for more than a month now without any progress on the matter, does anyone maybe know of a temporary fix that may work?

you could turn off nitro temporary

  • nuxt.config.ts
defineNuxtConfig({
   bridge: {
       nitro: false
   }
})

124 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Build fails with SSR turned off · Issue #27 · nuxt/bridge