I’ve been learning how to set up a basic babylon project locally, following the instructions located at Babylon.js ES6 support with Tree Shaking | Babylon.js Documentation. There is a summary of steps like so:
- Create new folder MyAwesomeApp
- Open GitBash (or similar) for MyAwesomeApp
- npm init
- npm install webpack webpack-cli webpack-dev-server --save-dev
- npm install --save-dev @babylonjs/core
- Create index.html file in MyAwesomeApp as described in First App Section below
- Create Folder src in MyAwesomeApp
- Create index.js file in src as described in First App Section below
- npx webpack serve to check result in http://localhost:8080/
- npx webpack _to create dist folder
I created the folder, followed all of the above commands, and pasted the index.html and index.js in their respective locations and directories. However, when I get to step 9, I get the following error:
ERROR in ./src/index.js 9:0-70
Module not found: Error: Can't resolve '@babylonjs/materials/grid/gridMaterial'
Indeed, I look within @babylonjs in the node_modules folder and I see no such directory that exists.
How can I resolve this?