 <p>The most probable reason I can think of is that since <code>__dirname</code> never ends with a trailing slash your path will become something like <code>/path/to/projectpublic</code> instead of <code>/path/to/project/public</code>. To make sure your path is correctly formatted use <a href="https://nodejs.org/api/path.html#path_path_join_paths" rel="nofollow noreferrer" title="path.join">path.join</a>. E.g:</p> <pre><code>app.use(express.static(path.join(__dirname, 'public'))) </code></pre>