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.
None of them replaced the version. Given that, there's a way to do so?
7 Replies
I think your first attempt, without scopes, should work
Delete your
node_modules
folder and deno.lock
file and try to run your project again with that importthere's no
node_modules
folder, and I deleted deno.lock
file alreadytry adding the following to your
deno.json
so that it creates a node_modules
folder:
"vendor": true
Hello @Leokuma , first, thanks for the help, unfortunately, I had no success, it has created
node_modules
, and vendor
folders, but the problem persists, I also deleted deno.lock
again.
Follow an image of the recently generated deno.lock
showing restructure
on its latest version.also on
node_modules
there's a folder with the lastet version 3.0.1
instead 3.0.0
Ok so I guess you can report your issue here: https://github.com/denoland/deno/issues/20868
GitHub
npm:
specifiers ignore import map · Issue #20868 · denoland/denoI'm running into a bug with Fresh when trying to switch over to npm: specifiers. When using both preact-render-to-string and preact Deno loads multiple copies of Preact. This breaks preact'...