4.0-alpha Error

Hey. Just started using babylon.js and loving it. Trying to get on newest alpha and finding some problems.

Failed to compile.

./node_modules/babylonjs-viewer/loader/modelLoader.js
Module not found: Can't resolve 'babylonjs-loaders/glTF/glTFFileLoader' in '.../node_modules/babylonjs-viewer/loader'

I’m trying to build with 4.0-alpha and getting an error

package.json:

'babylonjs": "^4.0.0-alpha.32",
    "babylonjs-loaders": "^4.0.0-alpha.32",
    "babylonjs-viewer": "^4.0.0-alpha.32",

Not sure what could be causing it.

I think you should use this

"@babylonjs/loaders": "^4.0.0-alpha.32",
"@babylonjs/viewer": "^4.0.0-alpha.32",

Pinging @sebavan who knows modules better than anyone:)

Could you let provide more info about the error ? You should not need anything aside viewer if you are using the viewer

Thanks Gil. Changing to

"babylonjs": "^4.0.0-alpha.32",
"@babylonjs/loaders": "^4.0.0-alpha.32",
"@babylonjs/viewer": "^4.0.0-alpha.32",

fixes the build

1 Like