Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
386 views
in Technique[技术] by (71.8m points)

javascript - $ 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. does anybody have any idea on how to fix this?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

What specifically is not "found"? Is it NPM? If so, check your PATH variable.

Since you are using a Mac, it should be here:

/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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...