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.

Missing documents for requiring `gl` as dev dependency in `luma.gl`

See original GitHub issue

Unit tests complain about missing gl in dependency

We are requiring luma.gl in our app. In our basic rendering unit test, we see a bunch of errors such as

  console.error node_modules/luma.gl/dist/es5/webgl-context/create-headless-context.js:27
    WebGL not available in Node.js, install using "npm install gl".
    Cannot find module 'gl' from 'create-headless-context.js'

It turns out that we’d need to add gl to our dev-dependency to pass these warnings. yarn add gl --dev

To Do List

  • Doc update Is there other better way to support unit tests? If not, it would be nice if we can add these requirements to the testing documentation.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
dmi3ycommented, Jun 6, 2019

Hi @shanshanzhu and @ibgreen we are trying to use deck.gl with nextjs with SSR and getting exactly the error while building app. What you would suggest for workaround?

0reactions
ibgreencommented, Jun 6, 2019

@dmi3y

  1. It is not an error, just a notification. It just says that while luma.gl was successfully imported, you won’t be able to call createGLContext without installing gl.
  2. I believe this error was removed a long time ago. What luma.gl version are you using?
Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing documents for requiring `gl` as dev dependency in ...
Unit tests complain about missing gl in dependency We are requiring luma.gl in our app. In our basic rendering unit test, we see...
Read more >
Getting Started - luma.gl
Getting Started. This tutorial will walk you through setting up a basic development environment for luma.gl applications using webpack.
Read more >
gl-scene - npm Package Health Analysis - Snyk
Initialize the scene. Checks that required properties are defined, and replaces missing properties with defaults where possible. If a shape has undefined styles ......
Read more >
Growing the Data Visualization Community with deck.gl v5
Only the main DeckGL component, which was required to use the rest of the API, was a React component. We added a top...
Read more >
pnpm/pnpm - Gitter
There are definitely different requirements for different usage scenarios. ... WARN deck.gl@4.1.6 requires a peer of luma.gl@^4.0.5 but none was installed.
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