Page Not Found, no index.html

My website returns ‘Page Not Found’ after a successful deploy

After researching the issue for a bit, I have seen someone here (not sure if that suits my issue as well though) suggest that Netlify serves /index.html if the site is loaded without a path. Well, I do not have an index.html, my default webpage is the index.ejs. The code works perfectly on my local machine, but I cannot make it work here for some reason. Maybe the problem is that I have to run ‘node app.js’ to run the website, but I cannot figure out how to do it on the Netlify

Here are the logs:
8:47:51 PM: Build ready to start
8:47:53 PM: build-image version: 122b31996ccaffd45d820a452d6227f8312110cc (focal)
8:47:53 PM: build-image tag: v4.5.3
8:47:53 PM: buildbot version: 618a04140a44a0a80470bd94a1ccfe6eb588786d
8:47:53 PM: Fetching cached dependencies
8:47:53 PM: Starting to download cache of 79.1MB
8:47:53 PM: Finished downloading cache in 545.065016ms
8:47:53 PM: Starting to extract cache
8:47:56 PM: Finished extracting cache in 2.188679626s
8:47:56 PM: Finished fetching cache in 2.747663302s
8:47:56 PM: Starting to prepare the repo for build
8:47:56 PM: Preparing Git Reference refs/heads/main
8:47:56 PM: Parsing package.json dependencies
8:47:57 PM: Starting build script
8:47:57 PM: Installing dependencies
8:47:57 PM: Python version set to 2.7
8:47:57 PM: Started restoring cached node version
8:47:59 PM: Finished restoring cached node version
8:48:00 PM: v16.13.2 is already installed.
8:48:00 PM: Now using node v16.13.2 (npm v8.1.2)
8:48:00 PM: Started restoring cached build plugins
8:48:00 PM: Finished restoring cached build plugins
8:48:00 PM: Attempting ruby version 2.7.2, read from environment
8:48:02 PM: Using ruby version 2.7.2
8:48:02 PM: Using PHP version 8.0
8:48:02 PM: Started restoring cached node modules
8:48:02 PM: Finished restoring cached node modules
8:48:02 PM: Started restoring cached go cache
8:48:02 PM: Finished restoring cached go cache
8:48:02 PM: go version go1.16.5 linux/amd64
8:48:02 PM: go version go1.16.5 linux/amd64
8:48:02 PM: Installing missing commands
8:48:02 PM: Verify run directory
8:48:04 PM: ​
8:48:04 PM: ────────────────────────────────────────────────────────────────
8:48:04 PM: Netlify Build
8:48:04 PM: ────────────────────────────────────────────────────────────────
8:48:04 PM: ​
8:48:04 PM: ❯ Version
8:48:04 PM: @netlify/build 26.2.2
8:48:04 PM: ​
8:48:04 PM: ❯ Flags
8:48:04 PM: baseRelDir: true
8:48:04 PM: buildId: 61fbf927fa3f020008a55bd3
8:48:04 PM: deployId: 61fbf927fa3f020008a55bd5
8:48:04 PM: ​
8:48:04 PM: ❯ Current directory
8:48:04 PM: /opt/build/repo
8:48:04 PM: ​
8:48:04 PM: ❯ Config file
8:48:04 PM: No config file was defined: using default values.
8:48:04 PM: ​
8:48:04 PM: ❯ Context
8:48:04 PM: production
8:48:04 PM: ​
8:48:04 PM: ────────────────────────────────────────────────────────────────
8:48:04 PM: 1. Build command from Netlify app
8:48:04 PM: ────────────────────────────────────────────────────────────────
8:48:04 PM: ​
8:48:04 PM: $ npm run build
8:48:05 PM: > poetry-shack@1.0.0 build
8:48:05 PM: > npm install
8:48:06 PM: up to date, audited 271 packages in 813ms
8:48:06 PM: 22 packages are looking for funding
8:48:06 PM: run npm fund for details
8:48:06 PM: found 0 vulnerabilities
8:48:06 PM: ​
8:48:06 PM: (build.command completed in 1.4s)
8:48:06 PM: ​
8:48:06 PM: ────────────────────────────────────────────────────────────────
8:48:06 PM: 2. Deploy site
8:48:06 PM: ────────────────────────────────────────────────────────────────
8:48:06 PM: ​
8:48:06 PM: Starting to deploy site from ‘’
8:48:06 PM: Creating deploy tree
8:48:06 PM: Creating deploy upload records
8:48:06 PM: 2 new files to upload
8:48:06 PM: 0 new functions to upload
8:48:06 PM: Site deploy was successfully initiated
8:48:06 PM: ​
8:48:06 PM: (Deploy site completed in 494ms)
8:48:06 PM: ​
8:48:06 PM: ────────────────────────────────────────────────────────────────
8:48:06 PM: Netlify Build Complete
8:48:06 PM: ────────────────────────────────────────────────────────────────
8:48:06 PM: ​
8:48:06 PM: (Netlify Build completed in 1.9s)
8:48:06 PM: Starting post processing
8:48:06 PM: Post processing - HTML
8:48:06 PM: Caching artifacts
8:48:06 PM: Started saving node modules
8:48:06 PM: Finished saving node modules
8:48:06 PM: Started saving build plugins
8:48:06 PM: Post processing - header rules
8:48:06 PM: Finished saving build plugins
8:48:06 PM: Started saving pip cache
8:48:06 PM: Post processing - redirect rules
8:48:06 PM: Finished saving pip cache
8:48:06 PM: Started saving emacs cask dependencies
8:48:07 PM: Finished saving emacs cask dependencies
8:48:07 PM: Started saving maven dependencies
8:48:06 PM: Post processing done
8:48:07 PM: Finished saving maven dependencies
8:48:07 PM: Started saving boot dependencies
8:48:07 PM: Finished saving boot dependencies
8:48:07 PM: Started saving rust rustup cache
8:48:07 PM: Finished saving rust rustup cache
8:48:07 PM: Started saving go dependencies
8:48:07 PM: Finished saving go dependencies
8:48:07 PM: Build script success
8:48:08 PM: Site is live :sparkles:
8:48:18 PM: Finished processing build request in 25.274135469s

hi there, to get this to work properly on Netlify, you will have to include an index.html file - that file can just be a loader file that grabs your ejs file, but it is necessary.

Well, I understood that, thanks. But how do I create that index.html loader file and make it grab my ejs?

I just need to launch my app by passing the ‘node app.js’ to the console or somewhere. Is that possible and if yes, how can I accomplish that?

This is not possible @havaian as per

Oh, I see. Thank you very much for your help!

P.s. I guess the issue is resolved