1

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:

  • OS Win7
  • Node.js version v5.3.0
  • npm version v3.3.12

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>
1
  • Why are you cloning the angular package? If you want to install it as a dependency you'd use npm install or bower install angular to install the dependencies, not clone the repo from github. Commented Dec 25, 2015 at 6:47

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Yeah. It seems when i use Git bash, and everything OK.Thank alots.
0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.