yoggyd
yoggyd15mo ago

deno doc: error: fp-ts

that's pretty much all I have :/ Running deno doc Server.ts only yields error: fp-ts. Can I enable some sort of verbose mode?
23 Replies
Kevin Whinnery
Kevin Whinnery15mo ago
is this happening for all files, or just this one? Possible to share a repro case? but also yes, that is not a great error message
yoggyd
yoggydOP15mo ago
not sure how I'd construct a repro case, but the "full" repo is public and while the types are relatively complicated it shouldn't be that much. I can share it if you want? and the repo only contains two files with Server.ts being the "main" file
Kevin Whinnery
Kevin Whinnery15mo ago
if you wouldn't mind sharing it, I can reproduce and we can go from there?
yoggyd
yoggydOP15mo ago
basically I've just moved from bun to deno and while it's not exactly been easy I could always find a solution - not for this one though :/
Kevin Whinnery
Kevin Whinnery15mo ago
To directly answer the question - I think passing -L trace might give more data. The --log-level flag allows you to use trace, debug, info for that value
yoggyd
yoggydOP15mo ago
❤️ I'll do that rn
Kevin Whinnery
Kevin Whinnery15mo ago
trace will be a lot :S
yoggyd
yoggydOP15mo ago
yeah but it's quite repetitive... didn't see anything out of the ordinary though, a few net permissions and oddly enough: fp-ts isn't mapped in importmaps (along with every other dependency)
DEBUG RS - import_map:1102 - Specifier "fp-ts" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "fast-querystring" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "cookie" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "@types/cookie" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "rxjs" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "fp-ts" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "fast-querystring" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "cookie" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "@types/cookie" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "rxjs" was not mapped in import map.
but it is mapped? the last few lines seem unremarkable to me:
DEBUG RS - deno::file_fetcher:254 - FileFetcher::fetch_cached - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/Comonad.d.ts
DEBUG RS - import_map:1102 - Specifier "https://esm.sh/v132/fp-ts@2.16.1/lib/Extend.d.ts" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "https://esm.sh/v132/fp-ts@2.16.1/lib/HKT/HKT.d.ts" was not mapped in import map.
DEBUG RS - deno::file_fetcher:550 - FileFetcher::fetch() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/JoinSemilattice.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:344 - FileFetcher::fetch_remote() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/JoinSemilattice
.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:254 - FileFetcher::fetch_cached - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/JoinSemilattice.d
.ts
DEBUG RS - deno::file_fetcher:550 - FileFetcher::fetch() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/MeetSemilattice.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:344 - FileFetcher::fetch_remote() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/MeetSemilattice
.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:254 - FileFetcher::fetch_cached - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/MeetSemilattice.d
.ts
DEBUG RS - deno::npm::resolution:318 - Snapshot already up to date. Skipping pending resolution.
TRACE RS - deno::cache::cache_db:102 - Cleaned up SQLite connection at /home/hesxenon/.cache/deno/dep_analysis_cache_v1
TRACE RS - mio::poll:662 - deregistering event source from poller
error: fp-ts
DEBUG RS - deno::file_fetcher:254 - FileFetcher::fetch_cached - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/Comonad.d.ts
DEBUG RS - import_map:1102 - Specifier "https://esm.sh/v132/fp-ts@2.16.1/lib/Extend.d.ts" was not mapped in import map.
DEBUG RS - import_map:1102 - Specifier "https://esm.sh/v132/fp-ts@2.16.1/lib/HKT/HKT.d.ts" was not mapped in import map.
DEBUG RS - deno::file_fetcher:550 - FileFetcher::fetch() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/JoinSemilattice.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:344 - FileFetcher::fetch_remote() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/JoinSemilattice
.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:254 - FileFetcher::fetch_cached - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/JoinSemilattice.d
.ts
DEBUG RS - deno::file_fetcher:550 - FileFetcher::fetch() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/MeetSemilattice.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:344 - FileFetcher::fetch_remote() - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/MeetSemilattice
.d.ts
DEBUG RS - deno_runtime::permissions:87 - ⚠️️ Granted net access to "esm.sh"
DEBUG RS - deno::file_fetcher:254 - FileFetcher::fetch_cached - specifier: https://esm.sh/v132/fp-ts@2.16.1/lib/MeetSemilattice.d
.ts
DEBUG RS - deno::npm::resolution:318 - Snapshot already up to date. Skipping pending resolution.
TRACE RS - deno::cache::cache_db:102 - Cleaned up SQLite connection at /home/hesxenon/.cache/deno/dep_analysis_cache_v1
TRACE RS - mio::poll:662 - deregistering event source from poller
error: fp-ts
am I missing something?
Kevin Whinnery
Kevin Whinnery15mo ago
I am able to reproduce this error on the repo you provided it's not obvious to me what the problem is off the top, still looking at some things
yoggyd
yoggydOP15mo ago
thanks 🙂
Kevin Whinnery
Kevin Whinnery15mo ago
If I use npm: specifiers instead of esm.sh for the imports, the command does seem to work then:
import { either, option, task, taskEither } from "npm:fp-ts";
import { flow, pipe } from "npm:fp-ts/lib/function";
import FastQuerystring from "npm:fast-querystring";
import * as Cookie from "npm:cookie";
import * as Rx from "npm:rxjs";
import { either, option, task, taskEither } from "npm:fp-ts";
import { flow, pipe } from "npm:fp-ts/lib/function";
import FastQuerystring from "npm:fast-querystring";
import * as Cookie from "npm:cookie";
import * as Rx from "npm:rxjs";
Though I don't know what precisely generates the error
yoggyd
yoggydOP15mo ago
hmmm, but it should work without them as long as you have the specifiers defined in the importmap, right?
Kevin Whinnery
Kevin Whinnery15mo ago
You can use npm specifiers in the import map for sure I think the issue here is something in how esm.sh is processing these node modules
yoggyd
yoggydOP15mo ago
hmmm, I'll try to use them in the importmap
Kevin Whinnery
Kevin Whinnery15mo ago
I will continue to try and figure out why this isn't working, but the bad error message is definitely a bug on our side to address
yoggyd
yoggydOP15mo ago
thx 🙂 (slight OT but how do I actually update the lock file after changing the specifiers 🤔 , nvm, I used write-lock instead of lock-write )
Kevin Whinnery
Kevin Whinnery15mo ago
it should update when you run with an updated deno.json, but can also delete the lockfile to have it regenerate
yoggyd
yoggydOP15mo ago
hmmm, can you give me an example? With npm://fp-ts@2.16.1/ I get an error for subpackage imports that looks like subpackage imports would build wrong file urls? error: Unable to load /home/hesxenon/projects/andale/node_modules/.deno/fp-ts@2.16.1/node_modules/fp-ts/lib/function imported from file:///home/hesxenon/projects/andale/Server.ts
Kevin Whinnery
Kevin Whinnery15mo ago
No description
Kevin Whinnery
Kevin Whinnery15mo ago
"imports": {
"lume/": "https://deno.land/x/lume@v1.19.1/",
"deno/": "https://deno.land/std@0.202.0/",
"fp-ts": "npm:fp-ts@2.16.1",
"fp-ts/lib/function": "npm:fp-ts@2.16.1/lib/function",
"fast-querystring": "npm:fast-querystring",
"cookie": "npm:cookie",
"rxjs": "npm:rxjs",
"zod": "npm:zod",
"unocss": "npm:unocss"
},
"imports": {
"lume/": "https://deno.land/x/lume@v1.19.1/",
"deno/": "https://deno.land/std@0.202.0/",
"fp-ts": "npm:fp-ts@2.16.1",
"fp-ts/lib/function": "npm:fp-ts@2.16.1/lib/function",
"fast-querystring": "npm:fast-querystring",
"cookie": "npm:cookie",
"rxjs": "npm:rxjs",
"zod": "npm:zod",
"unocss": "npm:unocss"
},
import { either, option, task, taskEither } from "fp-ts";
import { flow, pipe } from "fp-ts/lib/function";
import FastQuerystring from "fast-querystring";
import * as Cookie from "cookie";
import * as Rx from "rxjs";
import { either, option, task, taskEither } from "fp-ts";
import { flow, pipe } from "fp-ts/lib/function";
import FastQuerystring from "fast-querystring";
import * as Cookie from "cookie";
import * as Rx from "rxjs";
you can pin versions in import map too just did not in this example except for fp-ts Also, just for posterity and future explorers who might find this thread - it's definitely a good idea to use npm: specifiers rather than esm.sh - the former import path is actively developed and maintained by the core team
yoggyd
yoggydOP15mo ago
hey sorry I was cut off, just wanted to say thank you instead of just leaving like that 🙂

Did you find this page helpful?