Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: error TS2305: Module '"yargs-parser"' has no exported member XXX #3741

Closed
tomcohen opened this issue Aug 4, 2022 · 3 comments · Fixed by #3755
Closed

[Bug]: error TS2305: Module '"yargs-parser"' has no exported member XXX #3741

tomcohen opened this issue Aug 4, 2022 · 3 comments · Fixed by #3755

Comments

@tomcohen
Copy link

tomcohen commented Aug 4, 2022

Version

28.0.7

Steps to reproduce

npm install jest && ts-jest && tsc

Expected behavior

type script compile should pass

Actual behavior

type script compile failed

Debug log

09:05:32 node_modules/@types/yargs/index.d.ts(28,10): error TS2305: Module '"yargs-parser"' has no exported member 'DetailedArguments'.
09:05:32 node_modules/@types/yargs/index.d.ts(28,29): error TS2305: Module '"yargs-parser"' has no exported member 'Configuration'.

Additional context

yargs/yargs-parser#452

Environment

Ubuntu 18.04.6 LTS (GNU/Linux 5.4.0-1078-aws x86_64)
@ben-denzer
Copy link

I am not getting an error on npm install, but same error at compile time

`node_modules/@types/yargs/index.d.ts:28:10 - error TS2305: Module '"yargs-parser"' 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"' has no exported member 'Configuration'.

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

bnjmnt4n added a commit to supabase/storage that referenced this issue Aug 5, 2022
@bnjmnt4n
Copy link

bnjmnt4n commented Aug 5, 2022

This should be fixed by merging #3742 and creating a new release.

@ahnpnl
Copy link
Collaborator

ahnpnl commented Aug 5, 2022

You can just reinstall ts-jest should also fix the problem because we use ^ for yargs-parser.

fenos added a commit to supabase/storage that referenced this issue Sep 1, 2022
* chore: bump jest and related dependencies

* chore: add coverage npm script

* chore: enable coveralls code coverage upload

* chore: add custom override `yargs-parser` to fix failing build

This is required until kulshekhar/ts-jest#3741
is fixed.

* chore: fix typo in npm command in ci workflow

* chore: remove `package.json` override and just reinstall `ts-jest`

Co-authored-by: fenos <fabri.feno@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants