Search code examples
visual-studio-codeterminalts-node

Is there a way to run a package in node_modules without specifying the full path?


I want to run ts-node in the vs code's integrated terminal but I can only do so by specifying the full path. Is there a way to do it like i'm trying to in the screenshot.

enter image description here


Solution

  • Installing a package globally allows you to use the code in the package as a set of tools on your local computer.

    For this use you should install ts-node GLOBALLY:

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