Unable to build the doc' and run it locally

That’s funny because I created this page Improve Documentation - Babylon.js Documentation not too long ago, and I’m now stuck to an error and not able anymore to run the doc’ before editing and PR it :frowning:

So when using grunt build here what I’ve got:

I tried few commands, like:

  • npm install (to be sure installing new dependencies if so)
  • npm install -g grunt-sass & npm install -g node-sass 'cause the current error talks about that

I prefer to use yarn as it catches every downloaded package and never needs to run them again. Yarn also runs in parallel so that packages install much faster.

Galen

'don’t know what is Yarn, is it used in the doc repo? GitHub - BabylonJS/Documentation: BabylonJS documentation page
I’m a little confused about all these dev tools and how they run each next to the others :slight_smile:

Had a similar problem the other day and installed latest version of npm globally and re-install npm in the docs directory and grunt grunt-cli globally and in docs directory then it worked.

It might have been enough to update npm globally and reinstall locally in docs - not sure.

I think when you clone or pull docs locally the scripts are set to use npm and grunt for the build.

So I delete some folders in repo, to force git redownload them (node_modules, config, package.json, etc), also a npm install npm@latest -g followed by npm update -g, then npm install in the doc repo… and now, new error:

Success! \O/ As the error just above said, I deleted, again, node_modules folder + public/html/api folder, git checkout again,
redid a npm install, then a grunt build… and it works now, yep.

This was a lot of “I don’t know a fuck about what I’m doing” ahah

2 Likes

I would still check out yarn. It’s far more efficient, secure, and easy to use. At least check out the docs.

I hadn’t used this prior to working at Sony. However, once I was introduced, it made my life so much simpler.

Galen