DenoDDeno
Powered by
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"
}
"imports": {
  "restructure": "npm:restructure@3.0.0"
}

"scopes": {
  "fontkit@2.0.2": {
    "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?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Override NPM package dependency
AmusedGrapeAAmusedGrape / help
3y ago
fix library version of a dependency
pihentagyPpihentagy / help
14mo ago
Private NPM Registry config with $HOME/.npmrc and project/.npmrc
nomercy2124Nnomercy2124 / help
2y ago