How to prevent dynamic code from installing remote packages.
I want to allow user submitted code to be run but at the same time i do not want them to install remote dependencies (i.e. dynamic import from npm or jsr). My understanding is if i run
deno run --no-remote --cached-only
would do the job. I have ran deno cache
with vendor: true
in deno.json file. But, when i run with --no-remote
flag, i can't use any of the standard libs in my deno code. I am getting the follwoing error:
And main.ts:
Am I miss understanding the use of --no-remote
flag? My understanding is that when specified, it prevents fetching from remote. So in my case prevents user submitted code to be run without fetching remote dependencies. Please correct me if I am wrong. I am using deno 1.46.3
thank you0 Replies