Git bash always run 'export PATH=$PWD/node_modules/.bin:$PATH'

Viewed 425

recently I have had this issue with my git bash which always runs command
export PATH=$PWD/node_modules/.bin:$PATH
every time I open or start a new session. What is happening and what does the command mean? I'm quite new to CLI so I have no idea what's going on.

1 Answers

It can be because of a ~/.bashrc resource file, executed when a new shell session is opened.
With a "Git bash", that implies a Git for Windows, which means '~' or $HOME is by default %USERPROFILE%.

Or you are using a VSCode extension like antfu/vscode-auto-npx, in which case

When you open up a terminal in VS Code, this extension injects PATH env variable with the local Node.js binaries.

export PATH=$PWD/node_modules/.bin:$PATH
Related