找不到命令“ ember” [英] No command 'ember' found

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

问题描述

好像我搞砸了ember-cli安装。
我已经使用sudo安装了npm,但是在阅读了npm上ember-cli和sudo的一些问题之后,我按照此处的说明进行了卸载并重新安装 https://gist.github.com/isaacs/579814

Seems like I messed up with my ember-cli install. I had installed the npm using sudo, but after reading some issues with ember-cli and sudo on npm I went for uninstall and reinstall following the instruction here https://gist.github.com/isaacs/579814.

现在我已经通过<$安装了ember-cli c $ c> npm install -g ember-cli ,但是当我执行 ember new< name> 时,我得到

Now I have installed ember-cli through npm install -g ember-cli but when I do an ember new <name> I get


没有找到命令'ember',你的意思是:

No command 'ember' found, did you mean:

来自软件包'asn1c'的命令'enber'(universe)

Command 'enber' from package 'asn1c' (universe)

ember:找不到命令

ember: command not found

我可以做哪个节点


$哪个节点

$ which node

/ home / [user] / local / bin / node

/home/[user]/local/bin/node

哪个npm


$哪个npm

$ which npm

/ home / [user] / local / bin / npm

/home/[user]/local/bin/npm

,但是我可以看到在以下安装路径中存在余烬:

, but I can see that ember exists in the following path that is installed:


npm安装-g ember-cli

npm install -g ember-cli

/ home / [user] / npm / bin / ember-> / home / [用户] / npm / lib / node_modules / ember-cli / bin / ember

/home/[user]/npm/bin/ember -> /home/[user]/npm/lib/node_modules/ember-cli/bin/ember

任何想法如何使ember命令正常工作?

Any ideas how to get ember command working?

推荐答案

您需要确保 / home / [user] / npm / bin 在您的外壳程序中。您可以 echo $ PATH 来查看它是否包含在内。

You need to make sure /home/[user]/npm/bin is in your shell's path. You can echo $PATH to see if it's included.

对于Bash:

将此添加到您的 .bashrc .bash_profile

PATH=/home/[user]/npm/bin:$PATH

然后重新启动终端或运行 source〜/ .bashrc

And then restart your terminal or run source ~/.bashrc

对于ZSH:

将此添加到您的'.zshrc`

Add this to your '.zshrc`

path+=('/home/[user]/npm/bin')

然后重新启动终端或运行 source〜/ .zshrc

And then restart your terminal or run source ~/.zshrc

您将需要替换 [user] 中包含您计算机上用户名的路径。

You will need to replace [user] in the paths with your user name on your computer.

这篇关于找不到命令“ ember”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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