D
Deno

help

How can I get `npm` in the path for Deno.run()?

TTJBlackman1/23/2023
I'm writing a script to automate a tedious npm task that I run frequently. When I use Deno.run() it says that it can't find the program (see the screenshot). How can I get the npm executable in the scope of the Deno process? I'm using: - Windows 10 - Deno v1.29.4 - Npm v8.19.2 - npm path C:\Program Files\nodejs Bonus: I saw something about Deno.Command on another post, and I'm wondering if I should use that, and if so, where I can read about it's API. Thanks!
IioB1/23/2023
Try using Deno.command, yeah. The docs are at https://deno.land/api@v1.29.4?unstable=&s=Deno.Command. It's a bit unfortunate that we don't have a https://examples.deno.land about this, will open a PR soon.
Deno by Example
Deno by example is a collection of annotated examples for how to use Deno, and the various features it provides.
TTJBlackman1/23/2023
Same error!
UUUnknown User1/23/2023
Message Not Public
Sign In & Join Server To View
TTJBlackman1/23/2023
Same error. Uncaught NotFound: program not found I don't think npm is in scope - so to speak. Maybe if I use the complete executable path...
TTJBlackman1/23/2023
Got it! Thanks for everyone's help.

Looking for more? Join the community!

Recommended Posts
Use Deno.run() to communicate with ArduinoHey I'm trying to communicate via USB serial with my Arduino. My goal is to have the result I get viBest place to host server side Deno AppI have a server side app I want to host in a specific region and I only want 1 instance of it runninNPM Import missing typesPlaying around with some deno code and testing a npm import, the original package has types (redaxioUpdate value by reference without duplicating the dataIm exploring the world of FFI, porting some C applications I have to TypeScript, with the help of Dehow to hash very large filesWe have deprecated the old std/hash code in favor of the crypto module, but I do not know what the sxstate - no types importedimport * as xstate from "https://deno.land/x/xstate@xstate@4.35.2/src/index.ts"; file is cached, yetexample of kysely running on deno deploy?Deno Deploy awesomely can connect to postgres directly from the edge https://deno.com/blog/deploy-poUpdating digest with web cryptoFor some context, I'm updating some code that was importing from `std/hash` (specifically `std/hash/What would be the best third party module implementing `deflate()`?Currently using `npm:pako` but I'd like to avoid npm specifiers (modules in general).Pass string to struct FFIQuick question about Struct-Value feature, what would be the best way to pass `*const u8` (or stringdeno blog without html sanitizationI want to be able to javascript Canvas API things in my blog - surely this is possible?Killing subprocess not workingAnyone know what I'm doing wrong when trying to kill a process? I have a process start another proc