You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Further, Transport.ts starts with import EventEmitter from "events";
This code is only valid with "esModuleInterop": true - which would work, if the extending would have worked, but it is better to just remove the tsconfig.ts file and leave the responsibility to the root tsconfig file.
An alternative (or probably a better additional fix) ) would be to change the first line in Transport.ts to import { EventEmitter } from "events";
Expected behavior
No TS validation errors and being able to build the production project with Vite, npm run build.
Additional context
There seems to be one last conflict down the line, probably unrelated, but at least I want to mention it.
Inside Transport.ts line 377 if (resolveBusy) resolveBusy();
is unable to build due to error This expression is not callable. Type 'never' has no call signatures.ts(2349) let resolveBusy: never
I haven't investigated this issue further yet - so I cannot say much about it yet besides that it is another issue which is requiring a fix to have that package fully working in production builds created with Vite.
The text was updated successfully, but these errors were encountered:
Impacted Library name
@ledgerhq/hw-transport
Impacted Library version
6.30.6
Describe the bug
This might well apply to other libraries.
It looks like the tsconfig.json file should be excluded from the package
(https://github.com/LedgerHQ/ledger-live/blob/develop/libs/ledgerjs/packages/hw-transport/tsconfig.json)
because, that file extends a tsconfig.json file, which is not present when getting the package via npm.
{ "extends": "../../tsconfig.json", <-- NOT PRESENT "compilerOptions": { "outDir": "lib" }, "include": ["src/**/*"] }
Further, Transport.ts starts with
import EventEmitter from "events";
This code is only valid with "esModuleInterop": true - which would work, if the extending would have worked, but it is better to just remove the tsconfig.ts file and leave the responsibility to the root tsconfig file.
An alternative (or probably a better additional fix) ) would be to change the first line in Transport.ts to
import { EventEmitter } from "events";
Expected behavior
No TS validation errors and being able to build the production project with Vite, npm run build.
Additional context
There seems to be one last conflict down the line, probably unrelated, but at least I want to mention it.
Inside Transport.ts line 377
if (resolveBusy) resolveBusy();
is unable to build due to error
This expression is not callable. Type 'never' has no call signatures.ts(2349) let resolveBusy: never
I haven't investigated this issue further yet - so I cannot say much about it yet besides that it is another issue which is requiring a fix to have that package fully working in production builds created with Vite.
The text was updated successfully, but these errors were encountered: