ztraeshuxjmvZ
Denoβ€’3y agoβ€’
5 replies
ztraeshuxjmv

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

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!
npm.png
Was this page helpful?