Linux command
npm-bin 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Show local bin directory
npm bin
Show global bin directory
npm bin -g
Add local bin to PATH
export PATH="$(npm bin):$PATH"
说明
npm bin prints the folder where npm will install executables. For local installations, this is typically ./node_modules/.bin; for global, it depends on npm prefix. Adding the local bin to PATH allows running locally installed tools.
参数
- -g, --global
- Show global bin directory.
FAQ
What is the npm-bin command used for?
npm bin prints the folder where npm will install executables. For local installations, this is typically ./node_modules/.bin; for global, it depends on npm prefix. Adding the local bin to PATH allows running locally installed tools.
How do I run a basic npm-bin example?
Run `npm bin` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -g, --global do in npm-bin?
Show global bin directory.