首页 > 解决方案 > 通过 npm 安装后找不到 composer 版本

问题描述

当我跑

% npm install composer 

我收到:

+ composer@4.1.0
updated 1 package and audited 901678 packages in 9.221s

37 packages are looking for funding
  run `npm fund` for details

found 9 high severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

但是,当我运行时:

% composer -v

我收到:

zsh: command not found: composer

标签: npmnpm-install

解决方案


在中手动添加作曲家供应商 bin 路径.zshrc

export PATH="$PATH:$HOME/.composer/vendor/bin"

或者

_ _/usr/local/bin

或者

请运行这个brew install composer


推荐阅读