node-js examples not compiling
See original GitHub issueTo try and run the examples I do the following with a freshly cloned repo:
cd examples/examples-nodejs
npm i
tsc faceDetection.ts
I get the following error:
node_modules/@types/webgl2/index.d.ts:582:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'WebGL2RenderingContext' must be of type '{ new (): WebGL2RenderingContext; prototype: WebGL2RenderingContext; readonly ACTIVE_ATTRIBUTES: number; readonly ACTIVE_TEXTURE: number; ... 556 more ...; readonly WAIT_FAILED: number; }', but here has type '{ new (): WebGL2RenderingContext; prototype: WebGL2RenderingContext; readonly ACTIVE_ATTRIBUTES: number; readonly ACTIVE_TEXTURE: number; ... 557 more ...; readonly MAX_CLIENT_WAIT_TIMEOUT_WEBGL: number; }'.
582 declare var WebGL2RenderingContext: {
~~~~~~~~~~~~~~~~~~~~~~
../../../../../../usr/lib/node_modules/typescript/lib/lib.dom.d.ts:16485:13
16485 declare var WebGL2RenderingContext: {
~~~~~~~~~~~~~~~~~~~~~~
'WebGL2RenderingContext' was also declared here.
Found 1 error.
I have the following: tsc --version: 3.7.2 node --version: 12.13.0
I have tried adding skipLibCheck: true to tsconfig.json but it did not do any difference.
Do you have any idea why it is not working for node?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:18 (1 by maintainers)
Top Results From Across the Web
node.js - nodejs not compiling unimported files, even if such ...
I am importing my files using require(path + ".js") where path is a variable specified at runtime. Since the files specified in path...
Read more >Node.JS Compiling error - visual studio - Super User
So I want to compile a nodejs project to one windows executable so I ... You should commit this file. npm WARN default@1.0.0...
Read more >Compiling a Node.js Application into an .exe File - Section.io
In this tutorial, we'll learn how to create executable files for our Node.js application. Then, we'll compile our JavaScript files into an ...
Read more >Errors | Node.js v19.3.0 Documentation
For all EventEmitter objects, if an 'error' event handler is not provided, the error will be thrown, causing the Node.js process to report...
Read more >Why the Hell Would I Use Node.js? A Case-by-case Tutorial
You can significantly ease the development of an application that does not require CPU-intensive computation, by using Javascript to build it top to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The solution was to first run
in the root directory before trying to run the examples.
This command compile.
tsc --skipLibCheck faceDetection.ts
But then it doesn’t workerror: