Skip to content

The server production entry is missing #3229

@rtritto

Description

@rtritto

Description

Error: [@brillout/vite-plugin-server-entry@0.7.18][Wrong Usage] The server production entry is missing. If you use rollupOptions.output.entryFileNames then make sure you don't change the file name of the production server entry. One of the following is expected to exist: 
  /var/task/dist/server/entry.mjs
  /var/task/dist/server/entry.js
  /var/task/dist/server/entry.cjs
  /var/task/dist/server/entryLibraries.mjs
  /var/task/dist/server/entryLibraries.js
  /var/task/dist/server/entryLibraries.cjs
    at crawlOutDir (file:///var/task/dist/server/entrypoint.mjs:4963:3)
    at async importServerProductionEntry (file:///var/task/dist/server/entrypoint.mjs:4986:23)
    at async loadProdBuildEntry (file:///var/task/dist/server/entrypoint.mjs:5535:3)
    at async initGlobalContext (file:///var/task/dist/server/entrypoint.mjs:5520:9)
    at async initGlobalContext_renderPage (file:///var/task/dist/server/entrypoint.mjs:5509:2)
    at async renderPageServerEntryOnceBegin (file:///var/task/dist/server/entrypoint.mjs:7378:3)
    at async render (file:///var/task/dist/server/entrypoint.mjs:7366:29)

Reproduction

Additional information

  1. I added a post build postBuild.js to copy the /dist/server to /dist/client. By this way in the Vercel dashboard, on the Source Output, you can see the content of /dist/server in the /server folder.

  2. With a clean vite.config.ts having simple plugins usage (without the input option at standaloner.build and without the emit-server-entrypoint plugin), the /dist/entry.mjs is generated as:

    import "./chunks/chunk-DXM9g3cv.js";
    export {};

    Notes/observations:

    Reproduction of clean vite.config.ts: https://github.com/templates-ecosystem/template-vike-solid-daisyui-hono/tree/minimal-server-vercel (commit 13ec207)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions