DenoDDeno
Powered by
bombillazoB
Denoβ€’3y agoβ€’
1 reply
bombillazo

Run `nvm` using Deno.Command

Hello, I am trying to run
nvm
nvm
from a Deno script using Deno.Command.
  new Deno.Command('nvm', {
    args: ['use'],
    stderr: 'inherit',
    stdin: 'inherit',
    stdout: 'piped',
  }).outputSync;
  new Deno.Command('nvm', {
    args: ['use'],
    stderr: 'inherit',
    stdin: 'inherit',
    stdout: 'piped',
  }).outputSync;


but I am getting the following error:
Failed to spawn 'nvm': No such file or directory (os error 2)
Failed to spawn 'nvm': No such file or directory (os error 2)


nvm was install with brew and I tried passing
env: {PATH: Deno.env.get('PATH')
env: {PATH: Deno.env.get('PATH')
but nothing works...
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Migrating `Deno.run` to `Deno.command` with `readlines`
Ed, Edd n EddyEEd, Edd n Eddy / help
3y ago
Deno.Command
TangJieHaoTTangJieHao / help
3y ago
Using Deno.Command to run tailwindcss with watch flag not working
KyleJuneKKyleJune / help
3y ago