Cannot use deno prompt when in windows CMD
It only works in the VSCode integrated terminal? I have added some output around the run command, but when i do run <filename>.cvs it doesnt even reach any of the outputs.
51 Replies
heres the code.
Just as a note it works perfectly fine inside the VSCode powershell integrated terminal.
exactly what command are you giving it?
To run it im using deno run -A main.ts --developer
--developer being my custom arguement.
it still doesnt work without my custom arguement.
and what is the error message?
I said earlier, there is none.
Nothing happens.
Oh sorry, i did not say that earlier lol
can anyone help??
cd up one level and see what happens
same error?
Sorry, what do you mean?
like cd up to a different dir and run the script from there?
run the same command, I mean
if there's no console output at all, we need to start narrowing things down
is it an issue with the script and powershell in combination, or just with powershell overall?
a restart may also serve you well - windows can be troublesome about these things
I have had this issue for a month or two.
even powershell doesnt work. The only thing that works is the VSCode integrated powershell terminal.
I mean
not this scrpt
just run "deno" in powershell
no args
can you enter the REPL?
yep
alright, wonderful
and attempting to run the command from the wrong directory gives a "file not found" error, yes?
yep
was this what you meant?
running the command without -A does nothing as well?
running a different file within the same directory?
a different file in a different directory?
Oh im sorry lol didnt know what you meant
like a totally different script?
yes
the goal is to see if this particular script is the problem
Alright. let me make another script.
a basic hello world will do
Alrighty
yeah its good.
alright
so we've narrowed down the issue to this script
I have narrowed it down abit more.
It never even makes it to reading the file.
If i run it without permissions, here is the output in vscode:
perhaps one of the imports is creating a silent crash
In the cmd it just hangs.
sticks like this forever
now this is a bit silly but
when it hangs
what happens if you hit a key
I've had an issue with .NET apps where the console hangs until it detects keyboard input
even when there's no readline
Hey, thanks for that. Found this:
it hangs.
then i type another key and press enter then it works.
ah, so the same problem
Weird how this is a cmd specific issue.
I can only assume it's a powershell bug that microsoft never fixed so the vscode people did it themselves
since i've now seen it happen across two unrelated languages
Oh really?
Yeah not powershell specific.
happens over two seperate environments
windowsa command prompt is just an old version of powershell really
wouldn't be surprised if bugs persisted
Could it be an issue in my code?
more like
I think there's something in async stuff that windows just has trouble with sometimes
Ohhh, that makes sense.
there's a reason nobody deploys actual production on windows machines
Yeah lol
Is there anything i could do to fix this in my code?
or do i just gotta live with this
you could always strip everything except the imports, run it, then add back in one thing at a time until you find what breaks it
Doesnt seem to be an async issue either.
@cvs0 we've just published Deno 1.39.0 and I think https://github.com/denoland/deno/pull/18453 is a fix for that. Can you try updating and see if it resolves the issue?
Hey thanks!