esm.sh
esm.sh copied to clipboard
error using path=/ in importmap
I have the following error in the console when trying to import webSocker from rxjs.
Failed to resolve module specifier "rxjs/webSocket". Import Map: "rxjs/webSocket" matches with "rxjs/" but is blocked due to backtracking
My rxjs importmap values are as follows -
"rxjs": "https://esm.sh/[email protected]?pin=v89",
"rxjs/": "https://esm.sh/[email protected]?pin=v89&path=/",
"rxjs/operators": "https://esm.sh/[email protected]/operators?external=rxjs&pin=v89",
And the code causing the error is as follows -
import {webSocket} from 'rxjs/webSocket'
const subject$ = webSocket('wss://app.<domain>.com');
Does anybody know why I am getting the backtracking error ??
Steve
the error happened since deno import map resolver doesn't support ?path=/
, try the esm.sh CLI mode i'm working on it: deno run -A -r https://esm.sh add rxjs
I'm not using Deno.
The importmap is in the browser head section and has nothing to do with Deno
or you can use https://esm.sh/v89/[email protected]/
instead of https://esm.sh/[email protected]?pin=v89&path=/