electron / rebuild

Package to rebuild native Node.js modules against the currently installed Electron version
MIT License
1.03k stars 175 forks source link

Unavailable transitive dependencies (@types/keyv) due to dependency on old version of got #1037

Open raksooo opened 2 years ago

raksooo commented 2 years ago

It looks like @types/keyv and @types/cacheable-request were deprecated and had an update which is just an empty package. @types/cacheable-request has specified the @types/keyv version to * which leads npm to use the latest version, which is empty.

@types/cacheable-request is a dependency of got@11 and could be resolved by upgrading to got@12.

Here's the dependency tree from electron-rebuild to @types/keyv:

    └─┬ electron-rebuild@3.2.9
      └─┬ got@11.8.5
        └─┬ @types/cacheable-request@6.0.2
          └── @types/keyv@4.2.0
erickzhao commented 1 year ago

Definitely seems like something we should fix.

A temporary fix could be to use a resolution in your package.json to pin that version to the last @types/keyv version that wasn't stubbed out.

{
  "resolutions": {
    "@types/keyv": "3.1.4"
  }
}