HtLord
HtLord

Reputation: 13

Command "npm install" not work

When I direct to folder what I clone AngularJs by Git and try to use the command "npm install". Then, It always show the info below. I'm sure that I have package.json and cd to the folder.

Here is enviroment of mine:

Error Message:

events.js:141
throw er; // Unhandled 'error' event<
     ^

Error: This socket is closed.<br>
    at WriteStream.Socket._writeGeneric (net.js:640:19)<br>
    at WriteStream.Socket._write (net.js:694:8)<br>
    at doWrite (_stream_writable.js:292:12)<br>
    at writeOrBuffer (_stream_writable.js:278:5)<br>
    at WriteStream.Writable.write (_stream_writable.js:207:11)<br>
    at WriteStream.Socket.write (net.js:618:40)<br>
at WriteStream.stream.write (C:\ProgramFiles\nodejs\node_modules\npm\
node_modules\npmlog\node_modules\ansi\lib\newlines.js:36:21)<br>

at Cursor.write (C:\ProgramFiles\nodejs\node_modules\npm\
node_modules\npmlog\node_modules\ansi\lib\ansi.js:157:23)<br>

at Cursor.(anonymous function) [as show] (C:\Program Files\nodejs\
node_modules\npm\node_modules\npmlog\node_modules\ansi\lib\ansi.js:226:26)<br>

at Object.ProgressBar.hide (C:\Program Files\nodejs\node_modules\npm\
node_modules\npmlog\node_modules\gauge\progress-bar.js:101:15)<br>

Upvotes: 1

Views: 365

Answers (2)

Arvind
Arvind

Reputation: 857

I have used above codes with Git Bash (run as administrator) its working for me also. Thanks

Upvotes: 0

user5710358
user5710358

Reputation:

You need to go to your node folder where you installed it. Then go to your node folder and run below command to get bundle certificate.

~node > git config --system http.sslcainfo /bin/curl-ca-bundle.crt
~node > git clone --recursive git://github.com/isaacs/npm.git
~node > cd npm
~npm > node cli.js install npm -gf
~npm > npm install express -g

Git will not run in windows so you can install gitbash or any other git tool.

I hope it will help.

Upvotes: 1

Related Questions