简体   繁体   English

$ npm install eslint -g = -bash: $: command not found

[英]$ npm install eslint -g = -bash: $: command not found

I am trying to globally install eslint on my mac to use in vs code and it is returning the command not found.我正在尝试在我的 mac 上全局安装 eslint 以在 vs 代码中使用,它返回找不到命令。 does anybody have any idea on how to fix this?有人知道如何解决这个问题吗?

What specifically is not "found"?具体是什么没有“找到”? Is it NPM?是 NPM 吗? If so, check your PATH variable.如果是这样,请检查您的PATH变量。

Since you are using a Mac, it should be here:由于您使用的是 Mac,它应该在这里:

/usr/local/bin/npm

Also, this is a very generic and common question, please do some more research before posting here.此外,这是一个非常普遍和常见的问题,请在发布之前做更多的研究。

Edit: As per my comment below.编辑:根据我下面的评论。

Are you passing $: at the start of that command?您是否在该命令的开头传递$: In most documentation, this refers to the shell command prompt and should not be included in the command.在大多数文档中,这指的是 shell 命令提示符,不应包含在命令中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM