You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: vp preview fails on SolidStart v2 — looks for dist/server but build is in .output/server #2416
vp preview fails on a SolidStart v2 project. vp build succeeds, but vp preview throws:
error when starting preview server:
Error: Could not find the SolidStart server entry in <project>/dist/server
at resolvePreviewServerEntry (file:///.../@solidjs/start/dist/config/dev-server.js:108:15)
at configurePreviewServer (.../dev-server.js:20:54)
The build output lands in .output/server (Nitro's standard layout — the build log shows nitro ... preset: node-server writing .output/server/index.mjs), but SolidStart 2's configurePreviewServer hook hardcodes dist/server as the server-entry location. So preview looks in the wrong directory.
This is distinct from #1291 (SolidStart v1 / Vinxi dev-server support, closed). SolidStart v2 uses native Vite (no Vinxi), so the preview hook resolution is the remaining mismatch.
Steps to reproduce
Scaffold a SolidStart v2 project with the Tailwind template:
vp build
# succeeds — output written to .output/server and .output/public
Preview:
vp preview
# fails: "Could not find the SolidStart server entry in .../dist/server"
Expected behavior
vp preview should serve the production build — either by finding the server entry at .output/server (where Vite+/Nitro actually wrote it), or by delegating preview to Nitro's server for frameworks that use Nitro.
Actual behavior
vp preview errors out looking for dist/server, which never exists in a Vite+/Nitro build.
node .output/server/index.mjs (the start script) runs the production server correctly. The only broken piece is vp preview.
Related
Add vp dev support for SoldStart/Vinxi server #1291 (closed) — SolidStart v1 / Vinxi vp dev support. Different: this is SolidStart v2 + vp preview, where the failure is the preview server-entry path mismatch.
Looking at the stack trace, it points to resolvePreviewServerEntry in SolidStart.
at resolvePreviewServerEntry (.../@solidjs/start/dist/config/dev-server.js:108:15)
at configurePreviewServer (.../@solidjs/start/dist/config/dev-server.js:20:54)
at preview (.../vite/dist/node/chunks/node.js:...)
In other words, the actual server entry generated by Nitro is .output/server/index.mjs.
However, resolvePreviewServerEntry in SolidStart only searches for the following two files:
dist/server/entry-server.js
dist/server/entry-server.mjs
I also checked the execution order of the configurePreviewServer hook, and it was in the following order:
solid-start-dev-server
nitro:preview
The SolidStart hook runs first, but since the dist/server/entry-server.* it is looking for cannot be found, an error occurs. As a result, Vite's hook loop stops before processing can reach the subsequent nitro:preview.
Note that SolidStart's configureServer hook (for the dev server) already has a mechanism to skip processing if another plugin is managing the server.
if("dispatchFetch"inserverEnv)return;// another plugin is controlling the dev serverif(!isRunnableDevEnvironment(serverEnv)){return;}
However, it seems that configurePreviewServer hook, which is causing the issue this time, does not include such a skip mechanism.
Based on the above, I believe this is not an issue specific to Vite+, but rather a bug in the integration between SolidStart's preview hook and Nitro's preview processing.
Therefore, I will report this issue to the upstream repository solidjs/solid-start and share the link to the created issue here later.
I’ve closed solidjs/solid-start#2291 for now and will keep an eye on the Nitro PR. Once the fix is merged and released, I’ll check if it also resolves the VP preview failure reported here.
If the issue persists, I’ll reopen the SolidStart issue and look into it further.
Activity
fengmk2 commentedon Aug 11, 2026
cc @naokihaba
naokihaba commentedon Aug 11, 2026
@fengmk2
I'll take care of this.
naokihaba commentedon Aug 14, 2026
@Nicktriez cc @fengmk2
Thank you for the report.
I was able to reproduce the same behavior even after removing both
vite-plusand@voidzero-dev/vite-plus-coreand using only officialvite@8.2.0.https://github.com/naokihaba/repro-vite-plus-2416
https://github.com/naokihaba/repro-vite-plus-2416-plain-vite
Looking at the stack trace, it points to
resolvePreviewServerEntryin SolidStart.The relevant SolidStart implementation is here.
https://github.com/solidjs/solid-start/blob/main/packages/start/src/config/dev-server.ts
On the other hand, the Nitro build itself succeeds, and
.output/nitro.jsonoutputs the following:{ "serverEntry": "server/index.mjs", "commands": { "preview": "node ./server/index.mjs" } }In other words, the actual server entry generated by Nitro is
.output/server/index.mjs.However,
resolvePreviewServerEntryin SolidStart only searches for the following two files:dist/server/entry-server.jsdist/server/entry-server.mjsI also checked the execution order of the
configurePreviewServerhook, and it was in the following order:solid-start-dev-servernitro:previewThe SolidStart hook runs first, but since the
dist/server/entry-server.*it is looking for cannot be found, an error occurs. As a result, Vite's hook loop stops before processing can reach the subsequentnitro:preview.Note that SolidStart's
configureServerhook (for the dev server) already has a mechanism to skip processing if another plugin is managing the server.However, it seems that
configurePreviewServerhook, which is causing the issue this time, does not include such a skip mechanism.The test code for the relevant logic can be found here:
https://github.com/solidjs/solid-start/blob/main/packages/start/src/config/dev-server.spec.ts
Based on the above, I believe this is not an issue specific to Vite+, but rather a bug in the integration between SolidStart's preview hook and Nitro's preview processing.
Therefore, I will report this issue to the upstream repository
solidjs/solid-startand share the link to the created issue here later.naokihaba commentedon Aug 14, 2026
We will provide further updates on this matter at the following link:
solidjs/solid-start#2291
This issue will remain open for reference in case similar problems occur until it is fully resolved.
naokihaba commentedon Aug 16, 2026
This issue seems to be related to nitrojs/nitro#4509.
I’ve closed solidjs/solid-start#2291 for now and will keep an eye on the Nitro PR. Once the fix is merged and released, I’ll check if it also resolves the VP preview failure reported here.
If the issue persists, I’ll reopen the SolidStart issue and look into it further.
naokihaba commentedon Aug 18, 2026
A patch was applied in solidjs/solid-start#2294.
birkskyum commentedon Aug 18, 2026
Likely to be resolved by newly published
@solidjs/start2.0.1 - let me know how it fares.naokihaba commentedon Aug 18, 2026
@birkskyum Thank you! I will check it.
naokihaba commentedon Aug 18, 2026
@birkskyum I confirmed that upgrading solidjs/start to 2.0.1 resolves the issue.
Thank you very much.
https://github.com/naokihaba/repro-vite-plus-2416
naokihaba commentedon Aug 18, 2026
@Nicktriez Could you please check if the issue is fixed on your side when you get a chance?
Nicktriez commentedon Aug 18, 2026
@naokihaba preview works now. Good work.