mrking2you
I need more help understanding imports and relative paths for a module I am writing
I was making progress and feel like I have hit a wall again. 😢
I'm am trying to move away from the hardcoded
cli.js
file and replace chalk
with fmt/colors
. I have started to receive relative import paths errors again. This time for the standard fmt
module and I followed what was in the docs.
deno run -A --import-map https://raw.githubusercontent.com/kurtaking/octoherd-cli-deno/main/import_map.json octoherd.js run -S examples/script.ts
error: Relative import path "fmt/colors.ts" not prefixed with / or ./ or ../ and not in import map
import map
34 replies
I need more help understanding imports and relative paths for a module I am writing
I know there are a lot of improvements, opportunities to migrate to deno-specific modules, etc, but it feels SO good to have a working baseline to start from.
34 replies
I need more help understanding imports and relative paths for a module I am writing
https://deno.land/x/octoherdcli
My goal is to create a deno version of the existing
octoherd/cli
. I want to be able to leverage octoherd
while writing my scripts in TS.34 replies
I need more help understanding imports and relative paths for a module I am writing
Can I leverage the import map when add
deps.ts
?
edit: maybe I am confused and do not need to set things up as a library. I just want to be able to execute the cli.34 replies
I need more help understanding imports and relative paths for a module I am writing
@marvinh. I have enquirer set like this in my import_map.json
"enquirer": "npm:enquirer@^2.3.6"
So that will work for me, but not for others who run/install the module? i.e. It works when I run it locally, but I start to get the errors if I try to run/install from deno.land.34 replies