Your question doesn't include enough information for us to give a definitive answer. When possible, we like to plug your code into our own system to try to duplicate the problem.
Doing a "best guess" on my end; I'm assuming this is a javascript issue using the Express module. I was able to determine the path that express sees by using the following from index.js, which is referenced from my index.html:
const loc = window.location.pathname;
document.writeln(loc)
I was then able to see the result by entering the following path into my web browser:
file:///home/vikingglen/javascript/myapp/index.html
The following was displayed on my web page:
/home/vikingglen/javascript/myapp/index.html
Plugging that path into app.js, using the following code, I was able to access index.html:
const express = require('express')
const app = express()
const port = 3000
__dirname = '/home/vikingglen/javascript/myapp/'
app.get("/", function (req, res) {
console.log(__dirname + 'index.html');
res.sendFile(__dirname + 'index.html');
});
app.listen(port, () => {
console.log(`Example app listening at http://localhost:${port}`)
})
As a side note, I prefer to put a "/" at the end of directory paths so I can quickly tell it's a directory:
_dirname = '/home/vikingglen/javascript/myapp/'
instead of:
_dirname = '/home/vikingglen/javascript/myapp'
If this doesn't solve your problem, then you'll need to send us enough of your code so we can plug it into our own systems to reproduce the error.