Skip to content
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

websocket example broken on windows #4647

Closed
disizali opened this issue Apr 6, 2020 · 3 comments · Fixed by #5005
Closed

websocket example broken on windows #4647

disizali opened this issue Apr 6, 2020 · 3 comments · Fixed by #5005
Assignees
Labels
bug Something isn't working correctly

Comments

@disizali
Copy link
Contributor

disizali commented Apr 6, 2020

const file = await Deno.open(u.pathname);

this line have some problems in windows while running locally , error text :

error: Uncaught NotFound: The system cannot find the path specified. (os error 3)
► $deno$/ops/dispatch_json.ts:43:11
    at NotFound ($deno$/errors.ts:75:5)
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at sendAsync ($deno$/ops/dispatch_json.ts:98:10)

deno version : 0.39.0
windows : 10 x64

i will make a PR for this

@disizali disizali changed the title websocket bro websocket example broken on windows Apr 6, 2020
@Drunpy
Copy link
Contributor

Drunpy commented Apr 6, 2020

Hey @disizali, can you send steps to reproduce this error?

@disizali
Copy link
Contributor Author

disizali commented Apr 6, 2020

command :
deno --allow-net --allow-read server.ts

console at first step :
chat server starting on :8080....

and when localhost:8080 opend and new URL created , u.pathname will be :
/C:/Users/Ali/Desktop/deno/std/examples/chat/index.html
And it causes an error i mentioned before ,

same behavior in node for URL pathname .

@ry ry added the bug Something isn't working correctly label Apr 7, 2020
@keroxp
Copy link
Contributor

keroxp commented Apr 11, 2020

I've met similar situation on windows CI too many times. Path based on import.meta.url doesn't work windows. I'm not familiar with windows file system, /C:/Users/Ali/Desktop/deno/std/examples/chat/index.html is valid path for system?

This path is constructed based on import.meta.url(/C:/Users/Ali/Desktop/deno/std/examples/chat/server.ts) . Is also valid?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants