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.

electron-builder includes @types/yargs dependency, TypeScript has type errors on it

See original GitHub issue
  • Version: 22.9.1
  • Electron Version: N/A
  • Electron Type (current, beta, nightly): N/A
  • Target: N/A

My project indirectly has @types/yargs, due to it being a dependency of electron-builder:

❯ npm ls @types/yargs
nunisynth@1.0.0 /home/trusktr/src/project-alpha
└─┬ electron-builder@22.9.1
  └── @types/yargs@15.0.10 

And TypeScript complains about it:

❯ npx tsc
node_modules/@types/yargs/index.d.ts:28:10 - error TS2305: Module '"../../yargs-parser/build/index.cjs"' has no exported member 'DetailedArguments'.

28 import { DetailedArguments, Configuration } from 'yargs-parser';
            ~~~~~~~~~~~~~~~~~

node_modules/@types/yargs/index.d.ts:28:29 - error TS2305: Module '"../../yargs-parser/build/index.cjs"' has no exported member 'Configuration'.

28 import { DetailedArguments, Configuration } from 'yargs-parser';
                               ~~~~~~~~~~~~~


Found 2 errors.

Any ideas what’s going on with it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

8reactions
ihor-protsenko-theravencommented, May 19, 2021

I have the same problem

`node_modules/builder-util-runtime/out/httpExecutor.d.ts:2:10 - error TS2305: Module ‘“crypto”’ has no exported member ‘BinaryToTextEncoding’.

2 import { BinaryToTextEncoding } from “crypto”; ~~~~~~~~~~~~~~~~~~~~

`

2reactions
xiaoxiao95888commented, Jan 21, 2022

npm i electron-updater@4.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Typescript cannot find modules that are already installed
I am trying to build a client that runs on Electron with Typescript, however, I am getting errors from the request.ts files.
Read more >
Common Configuration
Type is specified after property name: Array<String> | String . ... false Boolean - Whether to build the application native dependencies from source....
Read more >
TypeORM - Amazing ORM for TypeScript and JavaScript (ES7 ...
Supports both DataMapper and ActiveRecord (your choice). Entities and columns. Database-specific column types. Entity manager. Repositories and custom ...
Read more >
yargs
Yargs helps you build interactive command line tools, by parsing arguments and generating an elegant user interface. It gives you:.
Read more >
Node.js v19.3.0 Documentation
Building; Linking to libraries included with Node.js ... Node-API callback types ... Error behavior; Integrity checks; Dependency redirection ...
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