question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: ENOENT, stat dist/index.html

See original GitHub issue

Sometimes console logs out Error: ENOENT, stat '/home/ubuntu/workspace/dist/index.html'

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:12 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
leomelincommented, Nov 19, 2015
  1. in project directory run “webpack” to generate /dist/ directory with files
  2. change output filename in webpack config file to “bundle.js” instead of “[name].js”, like this:
output: {
    path: path.join(__dirname, '/dist/'),
    filename: 'bundle.js',
    publicPath: '/'
  }
  1. npm start and it should work
0reactions
christianalfonicommented, Dec 28, 2015

cool 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error: ENOENT: no such file or directory, stat '/public/main.html ...
I had a similar issue when I referred to dist folder. the relative path to index.html was: app.get('*', (req, res) => { res.sendFile(path.join(__dirname, ......
Read more >
no such file or directory, open '/dist/index.html' · Issue #959 ...
Error : ENOENT: no such file or directory, open '\C:\Users\Bilal Khalid\Desktop\Practice Codes\universal\dist\browser\index.html' ...
Read more >
Error: ENOENT: no such file or directory, stat '/public/main.html ...
HTML : Error : ENOENT : no such file or directory, stat '/public/main. html ' at Error (native) [ Gift : Animated Search...
Read more >
Error: ENOENT: no such file or directory, stat '/opt/render ...
I have a next error: Error: ENOENT: no such file or directory, stat '/opt/render/project/src/client/build/index. html - Render.
Read more >
Error: ENOENT: no such file or directory, stat '/client/index.html'
Hi, when using .sendFile() it seems like I cannot serve static HTML above the current folder(above __dirname folder).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found