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.

[tfjs-node-gpu] node_modules/typescript/lib/lib.dom.d.ts:15340:11 - error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface 'WebGLRenderingContextBase'.

See original GitHub issue

TensorFlow.js version

@tensorflow/tfjs-node-gpu 0.1.1

Browser version

node v9.9.0, npm 6.2.0

Describe the problem or feature request

I just freshly installed tfjs-node-gpu on windows 10. Now I copy-pasted the “get started” code and tried to transpile it with typescript (tsconfig below). The project has no other dependencies.

Error message:

 tsc

node_modules/typescript/lib/lib.dom.d.ts:15340:11 - error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface 'WebGLRenderingContextBase'.
  Types of property 'getExtension' are incompatible.
    Type '{ (name: "ANGLE_instanced_arrays"): ANGLEInstancedArrays; (name: "EXT_blend_minmax"): EXTBlendMinMax; (name: "EXT_color_buffer_half_float"): EXTColorBufferHalfFloat; (name: "EXT_frag_depth"): EXTFragDepth; (name: "EXT_sRGB"): EXTsRGB; (name: "EXT_shader_
texture_lod"): EXTShaderTextureLOD; (name: "EXT_texture_filter_...' is not assignable to type '{ (extensionName: "EXT_blend_minmax"): EXT_blend_minmax; (extensionName: "EXT_texture_filter_anisotropic"): EXT_texture_filter_anisotropic; (extensionName: "EXT_frag_dep
th"): EXT_frag_depth; (extensionName: "EXT_shader_texture_lod"): EXT_shader_texture_lod; (extensionName: "EXT_sRGB"): EXT_sRGB; (extensionName: "OES...'.
      Types of parameters 'name' and 'extensionName' are incompatible.
        Type '"OES_vertex_array_object"' is not assignable to type '"ANGLE_instanced_arrays"'.

15340 interface WebGLRenderingContext extends WebGLRenderingContextBase {
                ~~~~~~~~~~~~~~~~~~~~~

Code to reproduce the bug / link to feature request

index.ts:

import * as tf from '@tensorflow/tfjs';
import '@tensorflow/tfjs-node-gpu';

const shape = [2, 3];
const t = tf.tensor([1.0, 2.0, 3.0, 4.0, 5.5, 60.0], shape);
console.log(t);

tsconfig.json:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es6",
    "sourceMap": true
  },
  "include": [
    "src/**/*.ts"
  ],
  "exclude": [
    "node_modules"
  ]
}

package.json:

{
  "name": "js",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "dependencies": {
    "@tensorflow/tfjs-node-gpu": "0.1.19"
  },
  "devDependencies": {
    "typescript": "^3.1.3"
  },
  "scripts": {
    "compile": "tsc",
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "keywords": [],
  "author": "",
  "license": "ISC"
}


package-lock.json: It’s quite spammy, heres a paste: https://pastebin.com/raw/nEiz26f7

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

15reactions
FoseFxcommented, Oct 20, 2018

For now I just use the --skipLibCheck option in tsc.

0reactions
dtruffautcommented, Jul 20, 2019

I confirm that “skipLibCheck”: true in tsconfig.json works fine !

Read more comments on GitHub >

github_iconTop Results From Across the Web

error TS2430: Interface 'WebGLRenderingContext' incorrectly ...
ts(15340,11): error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface 'WebGLRenderingContextBase'. Types of property ' ...
Read more >
error TS2430: Interface 'WebGLRenderingContext'...anycodings
../../../AppData/Roaming/npm/node_modules/typescript/lib/lib.dom.d.ts(15340,11): error TS2430: Interface 'WebGLRenderingContext' incorrectly extends interface ' ...
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