HylianComradeH
Denoβ€’2y agoβ€’
7 replies
HylianComrade

How to override the version from a dependency of a project's dependency from npm

I'm currently using react-pdf as a dependency, react-pdf uses fontkit as a dependency, and fontkit uses the npm restructure library.

restructure, on the other hand, broke fontkit, therefore I would like to replace the new restructure version with the old one, so I tried using Deno.json's imports map, and scopes as well.

"imports": {
  "restructure": "npm:restructure@3.0.0"
}

"scopes": {
  "fontkit@2.0.2": {
    "restructure": "npm:restructure@3.0.0"
  }
}


None of them replaced the version. Given that, there's a way to do so?
Was this page helpful?