connect ETIMEDOUT in installing NodeJS Modules

Error: connect ETIMEDOUT in installing NodeJS Modules

Tried: npm config set registry=”http://registry.npmjs.org/”

Still the same error

Next, I disabled proxy in IE settings: http://support.microsoft.com/kb/135982

No luck

Then enabled proxy in IE again and set env variable: http://jjasonclark.com/how-to-setup-node-behind-web-proxy

Note that in my IE options the Proxy was : proxy.company.com

Don’t forget to add http:// and port to it: http://proxy.company.com:8080

Finally do:

npm config set proxy http://proxy.company.com:8080

npm config set https-proxy http://proxy.company.com:8080

 

NOW ITS WORKING

 

Advertisements

nodejs integration with visual studio 2013

 

Set node modules folder: http://csell.net/2011/10/20/setting-up-npm-for-node-js-on-windows/

https://www.youtube.com/watch?feature=player_embedded&v=W_1_UqUDx2s

Node.js Tools for Visual Studio

  1. Analyse Menu Profiling
  2. Node Package Manager
  3. View Node interactive window
  4. Azure template as well to publish instantly

 

DOCS: http://nodejstools.codeplex.com/wikipage?title=npm

 

nodeJS + npm setup

1. Download the msi : http://nodejs.org/download/
2 .Run the node cmd prompt
3. install modules using npm install command Eg. npm install mongodb
4. in case the GET fails ( Eg. from GET https://registry.npmjs.org/express/2.5.9 )
then download the repo from github and then install it :

Eg.
I downlaoded Karma-master.zip and then :
> C:\Users\khematar>cd C:\Users\khematar\Bin\karma-master\karma-master
> npm install

 

Additional Setup for Native Modules support (like for node-sass)

BEST: https://github.com/Microsoft/nodejs-guidelines

https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules

  • Install https://github.com/nodejs/node-gyp post below prerequisites: On Windows:
    • Option 1: Install all the required tools and configurations using Microsoft’s windows-build-tools using npm install --global --production windows-build-tools from an elevated PowerShell or CMD.exe (run as Administrator).
    • Option 2: Install tools and configuration manually:
      • Visual C++ Build Environment:
        • Option 1: Install Visual C++ Build Tools using the Default Install option.
        • Option 2: Install Visual Studio 2015 (or modify an existing installation) and select Common Tools for Visual C++ during setup. This also works with the free Community and Express for Desktop editions.

        :bulb: [Windows Vista / 7 only] requires .NET Framework 4.5.1

      • Install Python 2.7 (v3.x.x is not supported), and run npm config set python python2.7 (or see below for further instructions on specifying the proper Python version and path.)
      • Launch cmd, npm config set msvs_version 2015
        • Check the right version using this: https://itayhauptman.wordpress.com/2016/04/10/msbuild-error-msb4019-the-imported-project-cmicrosoft-cpp-default-props-was-not-found-confirm-that-the-path-in-the-declaration-is-correct-and-that-the-file-exists-on-disk/

    If the above steps didn’t work for you, please visit Microsoft’s Node.js Guidelines for Windows for additional tips.

If you have multiple Python versions installed, you can identify which Python version node-gyp uses by setting the ‘–python’ variable:

$ node-gyp --python /path/to/python2.7

If node-gyp is called by way of npm and you have multiple versions of Python installed, then you can set npm‘s ‘python’ config key to the appropriate value:

$ npm config set python /path/to/executable/python2.7