question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

babylon.gui.d.ts is not a module

See original GitHub issue

Hi,

I started using BabylonJS with Typescript and it works flawlessly - all definitions are correct and there’re no problems when importing the main library. The problems occurs when I want to use use extensions library BabylonJS GUI. When installing it from NPM and importing it by:

import { AdvancedDynamicTexture, Button } from 'babylonjs-gui';

I’m getting following error:

File babylon.gui.d.ts is not a module

I see, that BabylonJS package and GUI extension differ a little bit - when investigating package.json file for both there’re differences in typings property, which is babylon.module.d.ts for BabylonJS and babylon.gui.d.ts for GUI.

What is the correct way to import this extension using NPM package?

I’m using 3.1.0-alpha1 for BabylonJS and 3.1.0-alpha1.2 for GUI.

Best regards, Kamil

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
deltakoshcommented, Aug 9, 2017

We are working on a fix:)

3reactions
deltakoshcommented, Sep 14, 2017

Current ETA: end of next week 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Babylon.inspector.module.d.ts 4.2 throws error
Upgraded to inspector 4.2 from 4.1 During compilation, compiler throws a bunch of following error do I need to additional dependencies to ...
Read more >
import an extension module in node - Stack Overflow
2)In my angular component I import the BABYLON declaration from the babylon.module.d.ts and babylon.max.js files in the above picture like so.
Read more >
Our Journey into the Module World. | by Babylon.js - Medium
Migrating to Modules in Typescript is not easy. You can read here about the difficulties we faced in our team to migrate Babylon.js....
Read more >
babylonjs-gui - npm Package Health Analysis - Snyk
Ensure you're using the healthiest npm packages. Snyk scans all the packages in your projects for vulnerabilities and provides automated fix advice.
Read more >
https://cdn.jsdelivr.net/npm/babylonjs-gui@3.3.0/b...
Tools/Gulp/babylonjs declare module 'babylonjs-gui' { export * from ... Function called to get the list of controls that should not steal the focus...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found