Where is index.html after npm run build? #5

Closed
opened 2025-11-11 14:01:40 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @coolaj86 on GitHub (Oct 21, 2023).

I'm not a Svelte dev.

I ran npm run build and I saw that ./build/ was generated.

I was expecting this to be the directory to serve from my webserver.

However, I can't find index.html there.... or anywhere:

fd -uuu | rg '.html$'
src/app.html
node_modules/tslib/tslib.html
node_modules/tslib/tslib.es6.html
node_modules/@sveltejs/kit/src/core/config/default-error.html

How do I create the directory that I serve with my webserver?

Originally created by @coolaj86 on GitHub (Oct 21, 2023). I'm not a Svelte dev. I ran `npm run build` and I saw that `./build/` was generated. I was expecting this to be the directory to serve from my webserver. However, I can't find `index.html` there.... or anywhere: ```sh fd -uuu | rg '.html$' ``` ```text src/app.html node_modules/tslib/tslib.html node_modules/tslib/tslib.es6.html node_modules/@sveltejs/kit/src/core/config/default-error.html ``` How do I create the directory that I serve with my webserver?
Author
Owner

@tjbck commented on GitHub (Oct 21, 2023):

Hi,

In SvelteKit with @sveltejs/adapter-node, the entry point for the server is the "index.js" file, not an "index.html" file. This is by design, and you can run the server by executing the following command in the repository directory:

node ./build/index.js

The "index.js" file handles server initialization and rendering the UI. If you have any further questions or need assistance, please don't hesitate to ask.

@tjbck commented on GitHub (Oct 21, 2023): Hi, In SvelteKit with @sveltejs/adapter-node, the entry point for the server is the "index.js" file, not an "index.html" file. This is by design, and you can run the server by executing the following command in the repository directory: ```sh node ./build/index.js ``` The "index.js" file handles server initialization and rendering the UI. If you have any further questions or need assistance, please don't hesitate to ask.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5