vite + ts + react not showing
ammertech
HOBBYOP

10 months ago

I successfully deployed my app but cannot see it.
Backend API calls are working fine

database is working fine.

locally the app runs fine running npm build

The deployment log says /dist/assets created successfully:
vite v6.0.11 building for production...

transforming...

✓ 2377 modules transformed.

rendering chunks...

computing gzip size...

dist/index.html 0.56 kB │ gzip: 0.34 kB

dist/assets/ammertech-Dk2LentV.png 46.03 kB

dist/assets/main-DH7UdbXi.css 21.42 kB │ gzip: 4.50 kB

dist/assets/index-DQyggCdS.js 0.74 kB │ gzip: 0.43 kB

dist/assets/main-B8jnzV8_.js 866.70 kB │ gzip: 238.34 kB

But if i enter page it says:
Starting Container

npm warn config production Use --omit=dev instead.

> ammeranalyzev2@1.0.0 start

> node dist-server/index.js

Server running on port 8080

Error: ENOENT: no such file or directory, stat '/dist/index.html'

Solved

3 Replies

brody
EMPLOYEE

10 months ago

Hello,

Please try using ./dist and ./dist/index.html within your path.join()


Status changed to Awaiting User Response Railway 10 months ago


ammertech
HOBBYOP

10 months ago

weird! But that fixed the problem. Thank you very much


Status changed to Awaiting Railway Response Railway 10 months ago


brody
EMPLOYEE

10 months ago

No problem!


Status changed to Awaiting User Response Railway 10 months ago


Status changed to Solved brody 10 months ago


Loading...