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

Installing globe.gl with npm results in non-working parcel due to tween.js version #63

Open
DrYerzinia opened this issue Aug 26, 2022 · 0 comments

Comments

@DrYerzinia
Copy link

Describe the bug

Importing Globe GL like so:

import Globe from 'globe.gl';

Results in the below error when running parcel.

Uncaught TypeError: Cannot read properties of undefined (reading 'update')
    at onFrame (three-globe.module.js:3289:13)
    at Function.init (three-globe.module.js:3290:6)
    at initStatic (kapsule.module.js:139:14)
    at comp (kapsule.module.js:133:7)
    at new FromKapsule (three-globe.module.js:3315:61)
    at linkKapsule (globe.gl.module.js:152:16)
    at 3DUmY.three (globe.gl.module.js:194:17)
    at newRequire (index.4d6bcbeb.js:71:24)
    at localRequire (index.4d6bcbeb.js:84:35)
    at 6bJph.three (GlobeVisualization.js:5:1)

The tween object appears to be undefined. The latest tween version is 18.6.4, forcing a downgrade to 18.6.0 resolves the import issue

npm install @tweenjs/tween.js@18.6.0

To Reproduce
Steps to reproduce the behavior:

  1. Create a node package
  2. Install globe.gl and parcel
  3. Create a file (index.js) that imports globe.gl
  4. run parcel index.js
  5. In the console the error shown above appears

Expected behavior
The import should complete instead of entering an infinite error loop

Desktop (please complete the following information):

  • OS: Ubuntu 22.04.1 LTS
  • Browser Chrome
  • Version 104.0.5112.101 (Official Build) (64-bit)
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

1 participant