DenoDDeno
Powered by
lillemanL
Denoβ€’12mo agoβ€’
1 reply
lilleman

Running deno add npm:xxx via docker results in not found

So, in an experiment to run most things via docker to isolate stuff on my system I'm trying to run Deno via docker. I have a very simple shell script file,
/opt/bin/deno
/opt/bin/deno
like this:

#!/bin/sh

docker run --rm -it --net host -w /srv -v $(pwd):/srv -u $(id -u):$(id -g) denoland/deno:2.2.5 deno "$@"
#!/bin/sh

docker run --rm -it --net host -w /srv -v $(pwd):/srv -u $(id -u):$(id -g) denoland/deno:2.2.5 deno "$@"


This is then added to PATH.

Now I try to run
deno init test && cd test && deno add npm:ejs
deno init test && cd test && deno add npm:ejs
and it results in "error: npm:ejs was not found."

If I remove
-u $(id -u):$(id -g)
-u $(id -u):$(id -g)
from the docker run command, the deno add command works, but all files are owned by root and that I don't want.

Sooo, what is going on? And any ideas on how to fix it?
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Running `deno` results in Fatal Error: HW Capability Found: [...]
FreyadayFFreyaday / help
5mo ago
Running npm modules via deno eval, prettier vs jsvu
Gary KGGary K / help
9mo ago
Module not found when running deno run
JoxJJox / help
3y ago
Running node/npm scripts with Deno
isAdrisalIisAdrisal / help
7mo ago