Skip to content

Server built by nuxt build fails to run on latest canary #25777

Closed
@nathanwhit

Description

Repro:

❯ deno run -A npm:nuxi init
# just press enter at each prompt
❯ cd nuxt-app
❯ deno task build
❯ deno run -A .output/server/index.mjs
Listening on http://0.0.0.0:3000

Then make a request

curl http://localhost:3000

Output

[nuxt] [request error] [unhandled] [500] The requested module 'vue' does not provide an export named 'unref' at file:///Users/nathanwhit/Documents/Code/repros/nuxt/nuxt-app/.output/server/chunks/routes/renderer.mjs:7:19
  at async Object.handler (./.output/server/chunks/runtime.mjs:2884:19)
  at async ServerImpl.toNodeHandle (./.output/server/chunks/runtime.mjs:3154:7)

I've been looking into this, it looks like it's another issue with our cjs->ESM analysis. Specifically the resolution we use there (which is its own bespoke resolution code) incorrectly resolves one of the files and causes the re-export analysis to miss items (like unref)

Activity

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

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working correctlynode compat

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions