Closed mceIdo closed 1 year ago
Does this happen with skipLibCheck: true
in your tsconfig?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you.
Does this happen with
skipLibCheck: true
in your tsconfig?
No, and I get it that it's part of the official docs to place this flag in case of an error, but our case doesn't allow skipping lib checks
In that case you may need to wait until we upgrade the version of typescript we compile with. We are planning on doing that in the nearish future but I can't give you an ETA on that. I think this is caused by a clash between the now built in types for webgl and the @types/webgl2 package we currently use.
cc @mattsoulanille
Bumping this, there's a new version of @types/webgl2 that's supposed to fix the bug. https://github.com/DefinitelyTyped/DefinitelyTyped/pull/51717
Since tfjs-backend-webgl pinned the dependency to version 0.0.5, we can't upgrade @types/webgl2 without changing tfjs-backend-webgl.
Any news on this?
The errors still occur with the latest version of @tensorflow/tfjs-node
and @tensorflow/tfjs-node-gpu
.
{
"name": "tensorflow-test",
"version": "0.0.1",
"private": true,
"description": "",
"scripts": {
"build": "./node_modules/typescript/bin/tsc --project ./tsconfig.json",
"start": "node src/index.js"
},
"dependencies": {
"@tensorflow/tfjs-node": "^3.9.0",
"long": "^4.0.0",
"nsfwjs": "^2.4.1"
},
"devDependencies": {
"@types/long": "^4.0.1",
"@types/node": "^16.10.1",
"@types/webgl2": "^0.0.6",
"typescript": "^4.4.3"
}
}
{
"compilerOptions": {
"target": "es6",
"module": "commonjs",
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"types": [
"node",
"long"
]
}
}
The errors are the same as in the first post.
I just ran into this bug. We've upgraded to TS 4.8.4, so I think we can remove @types/webgl2
. I'm trying that now.
System information
Describe the problem When trying to build a typescript code that depends on
@tensorflow/tfjs-backend-webgl
, if thecompilerOptions.target
is above ES5 (i.e "ES2015","ES2016","ES2017","ES2018","ES2019","ES2020" or "ESNext"), you get the following compilation errors:Provide the exact sequence of commands / steps that you executed before running into the problem The error is easily reconstructed with the following:
package.json:
tsconfig.json:
An empty index.ts
npm install
npm run build
Any other info / logs This partially relates to https://github.com/tensorflow/tfjs/issues/2007 but not the same issue