fcrozatier
fcrozatier
DDeno
Created by fcrozatier on 1/3/2025 in #help
Installing packages locally with Deno
I want a local copy of a foo js (node) module in my project that I'll be able to serve to the browser directly (no bundling). If I add it with deno add npm:foo then I can reference the module in my code but the browser won't be able to resolve foo. So I would like to know how I can make a local install with Deno (that's not in the global cache but in my local project), so that I just need to serve this folder and add an importmap script to tell the browser how to resolve foo. I could just npm install foo to have it in a local node_modules folder, but there must be a way to do this in Deno? https://docs.deno.com/runtime/reference/cli/add/#options
2 replies