Beginner: problem with the first exercise

I typed the command “npm i @babylonjs/core@preview” in the DOS Command window. A copy process was startet. Not more. I looked for the babylon.js file on the bybylon homepage, but didn’t found it. Therefor I downloaded the whole package from source forge (over 500MB). I created a html-page but the browser shows me the error “engine is not defined”. I think I refer to the wrong babylon.js. Thats the html-page:

< !DOCTYPE html>
< head>
< title>First Test
< /head>
< script src=“5.0.0-alpha.62/BabylonJS-Babylon.js-28a4262/dist/Babylon.js”> < /script>

< script>
const scene = new BABYLON.Scene(engine);
…< /script>
< body></ body>
< /html>

Is it neccessary to Upload all files to my internet server ?

Hello and welcome!
Seems that you mix several different setups and they will not work in this way.
It is possible to use just usual <script> tag in HTML file - Getting Started - Chapter 1 - Setup Your First Web App | Babylon.js Documentation
The fastest way to get the working example - just open the Playground and press Download button (shown at the screenshot below).

3 Likes