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

Categories

I'm learning nodeJs. I managed to run nodejs commands on cmd and it works fine. Now I want to install express framework and for that in the tutorial I'm following it asks to type sudo install -g express on npm command prompt. So I typed npm in my windows search, and clicked on it. Right after few seconds less than 3 it closes straight away.

I found that npm.cmd exist in nodejs directory where node.exe found. What could be the problem here. If I were to type the above mentioned command in windows cmd, it says sudo is unrecognized program.SO must I use npm cmd?

See Question&Answers more detail:os

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

1 Answer

After running cmd.exe , I guess you would have node installed but still run node -v , it should respond with the version meaning it's working. Now if you want to explicitly install express.js you just have to run on, the command prompt itself,

npm install express -g.

Anyways you can follow this link from their official website. Hope it helps. Also sudo is a program for Unix like operating systems, just in case you needed it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...