You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main.ts - file where I create worker and try to import Abort from deps.js
newThread(fetcher,"module",['import { Abort } from "./deps.js";']).postMessage(config).onMessage(handleResults);
Error I'm getting when running deno run --allow-read --allow-net main.ts
Download https://deno.land/x/Thread@v3.0.0/deps.js
error: Uncaught (in promise) TypeError: Module not found "https://deno.land/x/Thread@v3.0.0/deps.js".
let x = await import(fqfn); //Deno.realPathSync(fqfn)
^
at async Thread.copyDep (https://deno.land/x/Thread@v3.0.0/Thread.ts:85:15)
at async https://deno.land/x/Thread@v3.0.0/Thread.ts:42:58
at async Promise.all (index 0)
at async Thread.populateFile (https://deno.land/x/Thread@v3.0.0/Thread.ts:44:8)
I was trying to find why it's trying to import from https://deno.land/x/Thread@v3.0.0/deps.js but no clue. It seams to be happening here but I don't know how to debug Deno import.
Hey there @dergyitheron , i've been looking into this and it seems like importing from the github RAW url or using a local copy seems to work fine. for some reason using the denoland url fails tho..
For now (if feasible), you can use the following:
// import Thread from "https://deno.land/x/Thread@v3.0.0/Thread.ts"; // does not workimportThreadfrom"https://raw.githubusercontent.com/duart38/Thread/master/Thread.ts"// works// import Thread from "http://127.0.0.1:8080/Thread.ts" // works// import Thread from "./Thread.ts" // works
You may remove the commented ones that do not work.
I have simple folder structure:
Error I'm getting when running
deno run --allow-read --allow-net main.ts
I was trying to find why it's trying to import from
https://deno.land/x/Thread@v3.0.0/deps.js
but no clue. It seams to be happening here but I don't know how to debug Deno import.I basically just followed this example.
Is this possible or am I doing something wrong?
The text was updated successfully, but these errors were encountered: