Local npm package
I have a private local npm package located in /packages/my-package, which has its own npm dependencies.
How can I install this in my deno project (same repository)? I'm reading it should be possible now with https://github.com/denoland/deno/issues/15624, but I dont know how to implement this. Does it require the package to be published? How do I import it?
GitHub
Issues · denoland/deno
A modern runtime for JavaScript and TypeScript. Contribute to denoland/deno development by creating an account on GitHub.
4 Replies
@dsherret you available?
I tried the following:
But then I get:
And if I try to import
I get:
Ok, so I found out supabase edge functions still run one Deno v1. I've now forced supabase to use deno v2:
Using supabase-edge-runtime-1.68.0-develop.13 (compatible with Deno v2.1.4)However, I still can't get it to work. I keep running into the following issue:
Failed loading patch '../../packages/entities' in config 'file:///supabase/functions/'.: Could not find patch member in 'file:///packages/entities/'.Any help would be much appreciated!
A limitation atm is that the package name needs to exist on npm
really? I had that issue with deno v1, but now with v2 i have the error above
Is your patch solution available in Deno v2.1.4?
How should I set up my configuration in my case?
Is it possible to do this with npm install instead of deno install? Or should I not?
Do I need to have my local npm package published?
Once successfully setup, how should I import my local npm package in my code?
Initial support for patching local npm packages landed in 2.2.5 behind an unstable flag. It's expected to be unflagged in the upcoming Deno 2.3.0 release