I am unable to open Babylon locally in the browser

Hello, I’m trying to install Babylon.js locally. I only have experience with game engines, not web development. After many attempts, I managed to follow all the steps in the “Babylon.js ES6 support with Tree Shaking” section without any errors. However, when I enter the URL indicated by the terminal, “http://localhost:8080/”, all the browsers I have show “Cannot GET /”. I’m not sure what else to try, so if anyone could help me, I would appreciate it. Thank you. Regards.

Seems you don’t reach your index.html, which has to be in default folder. I think the default directory has to be called public, just create it and try move index.html-file there.

If it still not works, then could you share your package.json, webpack.config.js and directory hierarchy?

Ping the expert @RaananW


Eureka, thank you so much! I’ve been struggling for two days. I didn’t know if the problem was that I couldn’t see the main file. Then I noticed that one appeared when I ran npx webpack, but it didn’t do anything. I had already discovered that a public folder was mentioned in the terminal, and that’s how I managed to make the bundled file visible (I was testing with the produced main file). Indeed, the problem was that I had to put the HTML file inside the public folder, which I had to create manually (by chance). It wouldn’t hurt if those details were mentioned in the documentation, especially for computer-disabled people like me XD. Thank you again, let’s see how far I can go now.

1 Like