Can't get Getting Set Up How To to work - Cannot find module 'webpack-cli/bin/config-yargs'

I wanted to try to build something for the Oculus Quest, so I thought a good starting point would be “Getting Set Up” (https://doc.babylonjs.com/how_to/page2). It’s a nice tutorial, and easy to follow along. Until the absolute last step:

npm run start
Part of the error message is this:

Error: Cannot find module ‘webpack-cli/bin/config-yargs’
Require stack:

  • /Users/oscar/projects/multiblaster/node_modules/webpack-dev-server/bin/webpack-dev-server.js

I’m don’t know how to start trouble shooting this. Does anyone have an idea?

Hello and welcome!

Tha’ts an interesting error, as it is rather external to babylon.js. I haven’t followed the getting started lately (and i can secretly tell you it is being rewritten and it’s AMAZING), but it seems like some webpack command is incorrect.

The start command should be webpack serve instead of "start": "webpack-dev-server --port 8080". Does it work if you change it?

It did work! Thank you very much for the quick help.

Now I can go on and try some stuff myself! This will be fun…

1 Like