4.1.0-beta.12 seems to be missing babylon.d.ts

Hi

I linked 4.1.0-beta.12 to package.json. The downloaded node_modules/babylonjs folder does not seem to contain babylon.d.ts refered by its package.json but instead babylon.module.d.ts. For that reason the typescript definitions are not available.

Editing the manually the package.json typings line to the following worked:
“typings”: “dist/preview release/babylon.module.d.ts”,


dist/preview release/babylon.d.ts

Kind regards,
Tommi

This is actually not a bug. the npm package contains:
image

And its package.json points to it:

This allows to use babylon.js as a UMD module so either through namespaces or via imports.

What error are you experiencing ? A repro would be nice.

I added babylonjs beta to my project like this:
“babylonjs”: “git+https://git@github.com/BabylonJS/Babylon.js.git#4.1.0-beta.12”,

The node_modules contains now:
babylonjs/

  • dist/preview release/
  • package.json

The root package.json references ‘dist/preview release/babylon.d.ts’ incorrectly and this file is used when types are resolved. The dist/preview release contains most of the files including correct looking package.json and the babylon.modules.d.ts.

Kind regards,
Tommi

You can not use it directly from github, you can only do it from npm as there are more diffs than the one you noticed, on the npm version. We construct all the packages in a temp directory before submitting them as we are dealing with several versions (UMD/ES6) versions of the packages at once.

You could try babylonjs - npm fresh from today.

Thank you, the npm version worked.

2 Likes