Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not load 'BABYLON' #1094

Open
justinbmeyer opened this issue Nov 20, 2018 · 3 comments
Open

Could not load 'BABYLON' #1094

justinbmeyer opened this issue Nov 20, 2018 · 3 comments

Comments

@justinbmeyer
Copy link
Contributor

justinbmeyer commented Nov 20, 2018

I'm unable to build the egowall project because of cryptic message:

Could not load 'BABYLON'

Ideally, I'd like:

  • steal-tools to work
  • or if it is a problem with my code, to give a better warning what the problem is

As far as I can tell, this warning is not from babylon. The app loads fine in development. If I build smaller parts of the app that do use babylon, everything works.

I'm trying to create a minimal breaking case.

  • It seems like it's a problem with bundle. If I build egospace/components/game-app on its own, everything works. If I do it as a bundle, the build breaks.

The import looks like:

import BABYLON from 'babylonjs/dist/preview release/babylon.max.js';
@justinbmeyer
Copy link
Contributor Author

To workaround this bug, I had to install babylonjs in my main app. babylonjs is a dependency of a sub-project. I'm not sure why this was necessary.

@justinbmeyer
Copy link
Contributor Author

This can be duplicated by creating a sub project with "babylonjs": "^3.1.1", as a dependency. The sub-project should import that dependency as:

import BABYLON from 'babylonjs/dist/preview release/babylon.max.js';

With the following meta config:

      "babylonjs/dist/preview release/babylon.max.js": {
        "format": "global"
      }

Then make the main project import the sub project.

@matthewp
Copy link
Member

The space in the url is odd and something we likely don't have tests for. I wonder if there's a difference in Node vs browser there. Although the way the bug manifests I'm not sure why adding the package as a dependency fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants