D
Deno

help

Is there any way to trace where permissions prompts are coming from?

TFTim Fish12/30/2022
I'm running some code through Deno and its prompting for some permissions. How can I find out where these are coming form?
Rraunioroo12/30/2022
not 100% sure, but I think if you run without --prompt ( --no-prompt was removed in favour of --prompt IIRC ), or decline permission, doesn't it throw an exception with a stack trace pointing to the culprit?
TFTim Fish12/30/2022
I'm getting the following and I want to know what code is causing the prompt so I can fix it:
⚠️ ┌ Deno requests read access to <CWD>.
├ Requested by `Deno.cwd()` API
├ Run again with --allow-read to bypass this prompt.
└ Allow? [y/n] (y = yes, allow; n = no, deny) >
⚠️ ┌ Deno requests read access to <CWD>.
├ Requested by `Deno.cwd()` API
├ Run again with --allow-read to bypass this prompt.
└ Allow? [y/n] (y = yes, allow; n = no, deny) >
I can disable the prompt with --no-prompt but I'd like to fix this so others don't need to use that option
Rraunioroo12/30/2022
what happens if you deny? should throw an permission error. oh yeah, if the culprit is inside try catch block, it can be silent. so, yeah I'm dumb hopefully someone else can answer if it's possible to see the origin of permission prompt
UUUnknown User12/30/2022
Message Not Public
Sign In & Join Server To View
TFTim Fish12/30/2022
The only place I call Deno.cwd(), I query that permissions are granted first. Best guess is that this comes from an npm dependency But without a stack trace I'm not sure
UUUnknown User12/30/2022
2 Messages Not Public
Sign In & Join Server To View
TFTim Fish1/3/2023
I'm guessing compat is the cause
UUUnknown User1/3/2023
Message Not Public
Sign In & Join Server To View
TFTim Fish1/12/2023
Deno bundle doesn't work with npm dependencies yet

Looking for more? Join the community!

Recommended Posts
modifying the Deno objectheyo. is there any way to add our own properties to the `Deno` object? I read something which said sWhat postgres module should I use?I've been using `/x/postgres` for almost a year but I see that `/x/postgresjs` has been updated moreIs it possible to rename a module in third party modules?I've created a module and I would like to rename it as I think I broke convention. Is this possible?what is import.meta.url on implicit versionI am in an awkward situation where I want to test retrieving the version from the url of my module wDeno SDL2 Default Text Render Example (FFI problem w 1.29)Trying to get the font render example in the Deno SDL2 repo https://github.com/littledivy/deno_sdl2/third party module - edit webhook subdirectoryHi, I just published a module https://deno.land/x/sqlite_native@0.1.0 but the actual library contentPermissions dumpIs there a way to dump permissions to console or to a shell file after answering the prompts interacRemove trailing commasUsing the `deno.json` feature, how can I remove trailing commas? I can't find anything related to thCan you specify a git hash instead of version for npm modules?As the title mentions, I'd like to use a specific commit for an npm package. Is this possible?arch linux deno package might be brokenInstalling deno on arch linux appears to 404 on all the mirrors. I just synchronized them all as wel500 error in httpsdeno.landxfresh1.1.2srcserverhtmlescape.tsI'm having problems on my CI because this dependency returns a 500 error from deno.land. How can I dDisable Deno VSCode TS typesThis is a recent updates. I like to code in Javascript and the new types are incredibly distracting-discord.js with new npm importsHas anyone successfully used https://www.npmjs.com/package/discord.js with Deno's new import functioCan I programatically trigger a SIGINT event?I would like to trigger a SIGINT event from a file, is there a way to do this? For example in Node, i think the language server is brokenwas working perfectly fine last night, and im not sure how to fixHow to forward a reference to a componentI created this sample to exemplify what I don't understand. Using the Fresh framework, I created the[Fixed] Package cannot read a file from itself when loaded from urlI have a package A, which has to read an html file located at the package's root, such as the follow