Rusty
Rusty

Reputation: 142

How do I place `node_modules/.bin` in my $PATH?

I created a project in WebStorm and I installed some commands, like tsc, locally as a dev dependency on yarn through the terminal. I could run these in the terminal by simply typing for example tsc. However, when I do tsc in Visual Studio Code, bash tells me that it couldn't find the command. yarn tsc works just fine.

As I'm writing this, I'm also noticing that the WebStorm terminal puts the node_modules/.bin of my project into my $PATH.

How can I replicate this behavior in VS Code or in a terminal? Is there something like Python virtual environments?

Upvotes: 0

Views: 18

Answers (0)

Related Questions