0

I tried installing ts-node using npm using the following commands,

npm install -g typescript
npm install -g ts-node

reference: https://www.npmjs.com/package/ts-node#installation

However, when I run the ts-node on my terminal, I get such error: zsh: command not found: ts-node

FYI, echo $PATH produces /Users/myname/.local/share/solana/install/active_release/bin:/Users/myname/.rbenv/shims:/Users/myname/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Users/myname/.rbenv/shims:/Users/myname/Desktop/flutter/flutter/bin:/Users/myname/Desktop/flutter/flutter/bin:/usr/local/lib/node_modules/node/bin

Please help and thanks in advance...

Brian Yoon
  • 31
  • 2

1 Answers1

0

Run npm bin -g to get the global npm bin directory and then add it to PATH.

fn control option
  • 1,745
  • 6
  • 18