D
Deno

help

Cannot use deno prompt when in windows CMD

Ccvs012/13/2023
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.
Ccvs012/13/2023
heres the code. Just as a note it works perfectly fine inside the VSCode powershell integrated terminal.
PPastelStoic12/13/2023
exactly what command are you giving it?
Ccvs012/13/2023
To run it im using deno run -A main.ts --developer --developer being my custom arguement. it still doesnt work without my custom arguement.
PPastelStoic12/13/2023
and what is the error message?
Ccvs012/14/2023
I said earlier, there is none. Nothing happens. Oh sorry, i did not say that earlier lol can anyone help??
PPastelStoic12/14/2023
cd up one level and see what happens same error?
Ccvs012/14/2023
Sorry, what do you mean? like cd up to a different dir and run the script from there?
PPastelStoic12/14/2023
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
Ccvs012/14/2023
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.
PPastelStoic12/14/2023
I mean not this scrpt just run "deno" in powershell no args can you enter the REPL?
Ccvs012/14/2023
No description
Ccvs012/14/2023
yep
PPastelStoic12/14/2023
alright, wonderful and attempting to run the command from the wrong directory gives a "file not found" error, yes?
Ccvs012/14/2023
No description
Ccvs012/14/2023
yep was this what you meant?
PPastelStoic12/14/2023
running the command without -A does nothing as well? running a different file within the same directory? a different file in a different directory?
Ccvs012/14/2023
Oh im sorry lol didnt know what you meant like a totally different script?
PPastelStoic12/14/2023
yes the goal is to see if this particular script is the problem
Ccvs012/14/2023
Alright. let me make another script.
PPastelStoic12/14/2023
a basic hello world will do
Ccvs012/14/2023
Alrighty
Ccvs012/14/2023
No description
Ccvs012/14/2023
yeah its good.
PPastelStoic12/14/2023
alright so we've narrowed down the issue to this script
Ccvs012/14/2023
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:
Ccvs012/14/2023
No description
PPastelStoic12/14/2023
perhaps one of the imports is creating a silent crash
Ccvs012/14/2023
In the cmd it just hangs.
Ccvs012/14/2023
No description
Ccvs012/14/2023
sticks like this forever
PPastelStoic12/14/2023
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
Ccvs012/14/2023
Hey, thanks for that. Found this:
Ccvs012/14/2023
No description
Ccvs012/14/2023
it hangs. then i type another key and press enter then it works.
PPastelStoic12/14/2023
ah, so the same problem
Ccvs012/14/2023
Weird how this is a cmd specific issue.
PPastelStoic12/14/2023
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
Ccvs012/14/2023
Oh really? Yeah not powershell specific.
Ccvs012/14/2023
No description
Ccvs012/14/2023
happens over two seperate environments
PPastelStoic12/14/2023
windowsa command prompt is just an old version of powershell really wouldn't be surprised if bugs persisted
Ccvs012/14/2023
Could it be an issue in my code?
PPastelStoic12/14/2023
more like I think there's something in async stuff that windows just has trouble with sometimes
Ccvs012/14/2023
Ohhh, that makes sense.
PPastelStoic12/14/2023
there's a reason nobody deploys actual production on windows machines
Ccvs012/14/2023
Yeah lol Is there anything i could do to fix this in my code? or do i just gotta live with this
PPastelStoic12/14/2023
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
Ccvs012/14/2023
Doesnt seem to be an async issue either.
Mmarvinh.12/14/2023
@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?
Ccvs012/14/2023
Hey thanks!

Looking for more? Join the community!

Recommended Posts
Streaming large files with fetch and FormDataHi, I'm trying to find a way to build multiplart/form-data requests in Deno that contain large filesIf I want to integrate a fully featured Deno runtime into my application, where do I start?I want to create a scripting environment for my application that will enable people to create customTrying to deploy a project on Deno Deploy with a private Github repository dependencyBy reading the docs at https://docs.deno.com/runtime/manual/basics/modules/private I found that I caHow can I make sure the code gets run on the client-side??!```tsx import { useEffect, useState } from "preact/hooks"; export default function Callback() { VSCode + Deno + Vite + TypescriptJust setup a project with `create-vite-extra` but all the starter files are full of typescript errorMemory LimitHello guys, in some situations i'am receiving one of the following error message `dd-hard-memory-limGoogle CalendarHi! I am looking for a minimal example how to access google calendar API. I already obtained credenI can't access my deno cloud github accountPlease help, by mistake I converted my personal github account to an organization account, and now IUploaded a module, need help!I uploaded my module: https://deno.land/x/vipps_mobilepay_sdk@0.0.1 But then I realised that I shoulBetter way of finding element from mapIm making an api and all routes are stored in a map. is there a better and more optimised way to loodeno info depthhow do i limit maximum output depth for `deno info` command? for example, it's easier to analyze verDate libraryCan anyone recommend a decent working date library for deno? All the ones I'm trying (datefns, dayjsawait writer.write(buffer) never resolves on Deno.CommandHiho. I'm creating a `Deno.Command` that writes a buffer to `vipsthumbnail` via stdin (and reads theNot sure if I understand kv watch right?Not sure if I understand kv watch right, is like named queues? o more like a reliable Broadcast chanDisplaying a ModalI am trying to get a minimal example of using Bootstrap Modals, and managing that modal using state.How do I run an npm script with multiple dependencies, e.g. `drizzle-kit generate:pg`?I thought about wrapping it into a task `"generate": "deno run -A npm:drizzle-kit generate:pg"` in tHow to use a class name as a qualifier for an enum ?Hi there, it's more of a generic typescript question but I'm using it in the Deno context and the lihow can I make him see the process?```ts error: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'on') proImporting NPM Packages in Deno Throws 'Uncaught SyntaxError' for Specific ModulesHi there, I'm relatively new to Deno. I'm running into an error with an NPM package import. ```JS imHow to override type definitions provided by a third party module@Deno AI Helper How do I override type definitions provided by a third party module