-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deno error pure js file #5982
Comments
Reproducible on Linux with Deno v1.0.3. The same example works with Deno v1.0.2. This regressed with ad6d2a7 (determined with |
I forget to mention I am on windows 10, deno v1.0.3 |
I had the same problem a few minutes again, .ts would work, but not .js. However, looks like even the .js works now.. Someone fixed already ? deno run --allow-net helloWorld.ts both works. Thanks much & stay safe ! |
This error is caused by the fact that pre 1.0.3 TS compiler was created on demand for each encountered Question is: is importing |
Incrementally converting a project from JS to TS would be tough if not. I think unsafe code should be able to call safe code. |
Yeah, good argument. |
@sandeepgokhale If you add new import (that you never have before) to your helloWorld.js and try to run it then you should get error. When you compile .ts and then .js everything is working. Problem is when you do some new stuff on .js without .ts compilation. (At least that's my guessing) |
can i go back to previous version to fix this issue? |
This error should be fixed in the latest release (1.0.4) |
when i use denodb package, i still encounter this error, |
@lucacasonato Unfortunately it is not. |
Yes, still an issue on 1.0.5. Repro: import "https://deno.land/std@0.56.0/examples/welcome.ts";
If I import a local TS file instead of that remote one, the error won't occur. And any module that depends on import "./temp.js";
Same result if I used TS here. |
I am running into this issue today, some details bellow: On MacOS 10.5.4, here are my files: deps.js export { Application } from "https://deno.land/x/oak@v5.0.0/mod.ts"; mod.js import { Application } from "./deps.js";
const app = new Application();
app.use((ctx) => {
ctx.response.body = "Hello World!";
});
await app.listen({ port: 8000 }); Running with the command:
Console error: Compile file:///Users/dio/dev/test/mod.js
error: No such file or directory (os error 2) My current Deno setup: deno: 1.0.5 Happening since I've start testing a deps file on Deno 1.0.4 Edit:
|
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 also have this issue. How to fix it? |
The fix was released in Deno v1.1.0. Please upgrade and let us know if problem persists. |
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.
The text was updated successfully, but these errors were encountered: