brew install npm"npm:未找到命令"; [英] brew install npm "npm: command not found"

查看:108
本文介绍了brew install npm"npm:未找到命令";的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 brew install node 安装了节点,当我使用 node -v 时,我会遵循 v5.0.0 .但是,当我尝试运行 npm 命令时,我得到了 npm:命令未找到.

I've installed node using brew install node and when I use the node -v I get following v5.0.0. However when I try to run the npm command I get npm: command not found.

我已经尝试运行 brew install npm ,但是我只是得到了响应 node-5.0.0已经安装.

I've tried to run brew install npm, however I just got following response node-5.0.0 already installed.

发生这种情况的原因是节点也返回了未找到的命令,但是我通过运行 brew链接节点进行了修复,但是npm似乎仍然不起作用.

It happened with node also returning command not found, but that I fixed by running brew link node, however npm still does not seem to work.

如何解决此问题?

推荐答案

尝试运行

$ brew postinstall node

这篇关于brew install npm"npm:未找到命令";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆