deno: Deno error pure js file
When I try to run deno.land server example code:
import { serve } from "https://deno.land/std@0.54.0/http/server.ts"; const s = serve({ port: 8000 }); console.log("http://localhost:8000/"); for await (const req of s) { req.respond({ body: "Hello World\n" }); }
but as JavaScript file (deno run --allow-net server.js) I get error:
[Error 3] The system cannot find the path specified
Only when I run it as .ts and then again as .js it work.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (6 by maintainers)
I have exactly the same error from today that I went from version 1.0.3 to 1.0.5
Update: I’m looking into this issue and found root cause. Fix will be released in Deno 1.1 in a few days.
I am running into this issue today, some details bellow:
On MacOS 10.5.4, here are my files:
deps.js
mod.js
Running with the command:
Console error:
My current Deno setup:
deno: 1.0.5 v8: 8.4.300 typescript: 3.9.2
Happening since I’ve start testing a deps file on Deno 1.0.4
Edit: If I try to change the deps.js file to deps.ts, the error changes to: