Tensorflow NPM Packages are shipping TypeScript sources instead of just the distrubtion files [URGENT]
See original GitHub issueThis is in my package.json
"@tensorflow/tfjs": "^2.0.1",
I’m getting this error:
/path/to/project/node_modules/@tensorflow/tfjs-core/src/environment.ts
TypeScript error in /path/to/project/node_modules/@tensorflow/tfjs-core/src/environment.ts(45,3):
Property 'platformName' has no initializer and is not definitely assigned in the constructor. TS2564
43 | private urlFlags: Flags = {};
44 |
> 45 | platformName: string;
| ^
46 | platform: Platform;
47 |
48 | // tslint:disable-next-line: no-any
I also tried "skipLibCheck": true
in tsconfig.json
but that didn’t work either.
In the case of tfjs, there are actual .ts files (e.g.
node_modules/@tensorflow/tfjs-core/src/environment.ts
) which cause the failure.
Generally npm modules should ship compiled files and their public APIs, so anything happening internally (in js files) should not be reported.
Related https://www.reddit.com/r/typescript/comments/hjgd30/skiplibcheck_but_for_ts_files/
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:11 (2 by maintainers)
Top Results From Across the Web
How to use tensorflow js (tfjs) from typescript? - Stack Overflow
But it doesn't exist. On tensorflow js github repository I can see that it is developed using Typescript, but it seems they did...
Read more >@tensorflow/tfjs-node - npm
This repository provides native TensorFlow execution in backend JavaScript applications under the Node.js runtime, accelerated by the TensorFlow ...
Read more >Setup | TensorFlow.js
Node.js Setup You can use either the npm cli tool or yarn to install TensorFlow. js. Option 1: Install TensorFlow. js with native...
Read more >Creating a TS-written NPM package for use in Node-JS or ...
includes . include: Ensure only the Typescript in src is compiled & ignore all other source files (like the tests). Since you cannot ......
Read more >Organize multiple functions | Cloud Functions for Firebase
Organize functions in codebases. Managing multiple repositories; Managing multiple source packages (monorepo). Write functions in multiple files ...
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
Found the bug, it was an errant import path in our source. Should be resolved in the next release goes out.
Are you satisfied with the resolution of your issue? Yes No