patwasalinguist
Current way to install -g a tool with deno add?
Hi all,
Not sure if I missed this somewhere in the docs, but perhaps someone else has the same problem, so I’ll ask: suppose I have a script that uses something from @std, let’s say, {resolve} from @std/path.
If I want to install a script
do-thing.js
and it contains import {resolve} from "@std/path"
(this is after running $ deno add jsr:@std/path
), do I have to do anything to install that as a utility?
runs without complaint, and the script ends up in the path as expected, but when I try to use it I get the error:
error: Relative import path "@std/fs" not prefixed with / or ./ or ../ hint: If you want to use a JSR or npm package, try running deno add jsr:@std/fs or deno add npm:@std/fs at file:///Users/me/do-thing.js:3:26But as mentioned above, I already had done
deno add @std/path
.
Any suggestions? TIA.4 replies
Docs on deno cache
Hi all, I’m confused about the state of the deno cache subcommand. It seems that the online docs are redirecting to deno install now, but $ deno help cache still gives info in v2.0.6. Is deno cache going away, to be replaced by deno install?
2 replies
Serve a directory index with oak?
Hi, I’m wondering if anyone can help me out having Oak serve a directory index (the way apache does, for instance) if a user goes to /some/directory/path? (Sorry if this is the wrong discord, I couldn’t find one related to Oak…)
1 replies
Deno KV: Should I expect 'value too large' errors inserting a JSON file with kv.set?
I was trying out kv and quickly ran into something I found surprising;
hieroglyphs.json
is not huge (360K), and yet I get this error:
I feel like I’m missing something obvious; am I trying to do something kv wasn’t designed for?
TIA6 replies
Possible to deploy the chat example to deno deploy?
I would like to try running this demo on deno deploy:
https://deno.com/manual@v1.34.0/examples/chat_app
However, I have seen somewhere that deploy doesn't suport websockets. Is this currently the case? Is it possbile to run this with deploy?
thanks
10 replies
Is inspecting import.meta.url a reliable way to distinguish browser and deno contexts?
I have been trying to figure out a good pattern to import JSON that will work whether called in deno or the browser. This is what I was thinking:
I would welcome advice as to whether this is a good approach to this problem.
thanks 🙏
11 replies