Types issue with Glob and Minimatch
cbartondock opened this issue ยท 10 comments
When I run rimraf dist I see:
node_modules/@types/glob/index.d.ts:29:42 - error TS2694: Namespace
'"D:/Projects/Development/steam-rom-manager/node_modules/minimatch/dist/cjs/index"'
has no exported member 'IOptions'.
29 interface IOptions extends minimatch.IOptions {
node_modules/@types/glob/index.d.ts:74:30 - error TS2724:
'"D:/Projects/Development/steam-rom-manager/node_modules/minimatch/dist/cjs/index"'
has no exported member named 'IMinimatch'. Did you mean 'Minimatch'?
74 minimatch: minimatch.IMinimatch;
Found 2 errors in the same file, starting at: node_modules/@types/glob/index.d.ts:29
Error is also noted here, and the solution is to not run rimraf:
https://stackoverflow.com/questions/75890950/node-modules-minimatch-dist-cjs-index-has-no-exported-member-ioptions
Minimatch, glob, and @types/minimatch and @types/glob are all at their latest version.
You shouldn't need those @types
packages if rimraf glob and minimatch are all at latest. They're written in typescript. Maybe remove those?
Confirmed, the @types
are borked. Remove them and it works just fine.
npm rm @types/glob @types/rimraf @types/minimatch
npm i rimraf@latest
Thanks this does work, although it is still bit annoying since @types/glob is listed as an (optional) dependency for @electron/asar, so running npm install will put it right back.
Sounds like @electron/asar needs to not have that optional dep. DT types should usually only ever be dev deps. Tell 'em I sent ya.
I'd help more, but there's literally nothing I can do. I don't maintain electron, definitelytyped, or typescript. Fwiw I did request that they remove the @types/glob type, or make it a stub, because glob has its own types now.
Thanks for your help!
@isaacs
I am also facing the same issue,
node_modules/minimatch/dist/cjs/index"' has no exported member 'IOptions'.
node_modules@types\glob\index.d.ts 29
C:\Users\xxx\Source\repos\xxxx\Angular\tsconfig.json
Do you want to remove the @types/glob type? If I remove the glob folder , its regenerating the folder again.
I can't ask everyone to do the same, right?
Do I need to make any changes to the package.json or tsconfig file? becuase I want to push the code our QA server without any issue.
I have same issue with karma-sonarqube-reporter@1.4.0 that has dependency on @types/glob@7.2.0 but can't figure out how to solve it. Sorry not an expert at Angular and npm :)
Can you please help me?
Please follow the steps I detailed above.