Saturday, February 5, 2011

Install Node JS On Windows 2008 and Windows XP

Installing Node JS on Windows 2008 and XP, took me some time and a lot of Googling.
Plus, if you are like me: not a Linux and Cygwin guy, that's even more a challenge.
Anyway I was able to make it.

Here is a summary:

Remarks: On Windows XP thing are simpler, I will mention step that can be skipped for Windows XP. Different version of node.js seems to have different problems. So first I will install and compile node-v0.2.0.
At the of the post I will show how to download and compile node-v0.2.6.
At this time 2011/2/5, I have problems building v0.3.x. I decided not to look into it.

This post is based on information I gathered on the following blog posts and my own experiments:

- Step by step instructions to install NodeJS on Windows
- Node.js on Windows 7 under Cygwin, "FixImage error 13" problem
- cyg-apt

Installing cygwin.com

- Goto http://www.cygwin.com/ and download setup.exe
- Run setup.exe as an administrator















-  Filter on python and install all from the python section



- Filter on make and install all from the devel section


- Filter on G++ and install all from the devel section


- Filter on wget and install all from the devel section


Update file rebaseall (Not need for XP)
- With an editor open the file "C:\cygwin\bin/bin/rebaseall"
- Goto line 83 and comment line TmpDir="${TMP:-${TEMP:-/tmp}}"
- Add this line: TmpDir="/tmp"


- Goto line 110 and add this extra filter
-e '/\/sys-root\/mingw\/bin/d'



Run rebaseall (Not needed for XP)
- open a command prompt as administrator
- goto C:\cygwin\bin
- run ash.exe
- enter: rebaseall -v
- quit ash anyway you can (click the close icon)

Get the source code of node.js v0.2.0
- Open the Cygwin console
- Run this batch file as administrator C:\cygwin\Cygwin.bat
- type:pwd [enter]
- You should be located in your folder folder /home/ftorres which is on the disk C:\cygwin\home\ftorres
- To download source code and compile Node.js enter the following command

     wget http://nodejs.org/dist/node-v0.2.0.tar.gz
     tar xvf node-v0.2.0.tar.gz
     cd node-v0.2.0/
     ./configure
     make
     make install

- To check that node js has been built enter
      C:\>node --version

Testing helloWorld.js
- from http://nodejs.org/ download the hello world sample
- save it to a file in the current directory
- run node.exe HelloWorld.js
- Enter the following url in any browser http://127.0.0.1:8124


Get the source code of node.js v0.2.6
- Open the Cygwin console
- Run this batch file as administrator C:\cygwin\Cygwin.bat
- type:pwd [enter]
- You should be located in your folder folder /home/ftorres which is on the disk C:\cygwin\home\ftorres
- To download source code and compile Node.js enter the following command

     wget http://nodejs.org/dist/node-v0.2.6.tar.gz
     tar xvf node-v0.2.6.tar.gz
     cd node-v0.2.6/
     ./configure --without-ssl 
     make
     make install

- To check that node js has been built enter
      C:\>node --version



Issue with DNS


I tried to write a program that was downloading an rss feed and was faced with DNS error.

I find this post Getting Started with Node.js on Windows from Matthew Podwysocki,
which had the solution.

with the notepad create the file C:\cygwin\etc\resolv.conf and paste the following:

nameserver 8.8.8.8
nameserver 8.8.4.4

42 comments:

  1. Replies
    1. IEEE Final Year Project centers make amazing deep learning final year projects ideas for final year students Final Year Projects for CSE to training and develop their deep learning experience and talents.

      IEEE Final Year projects Project Centers in India are consistently sought after. Final Year Students Projects take a shot at them to improve their aptitudes, while specialists like the enjoyment in interfering with innovation.

      corporate training in chennai corporate training in chennai

      corporate training companies in india corporate training companies in india

      corporate training companies in chennai corporate training companies in chennai

      I have read your blog its very attractive and impressive. I like it your blog. Digital Marketing Company in Chennai

      Delete
  2. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Node JS Online Training from India . or learn thru Javascript Online Training from India. Nowadays JavaScript has tons of job opportunities on various vertical industry. ES6 Online Training

    ReplyDelete
  3. Very nice post here and thanks for it .I always like and such a super contents of these post.Excellent and very cool idea and great content of different kinds of the valuable information's.
    Best Devops Training in pune
    Microsoft azure training in Bangalore
    Power bi training in Chennai

    ReplyDelete

  4. It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.

    Selenium training in Chennai

    ReplyDelete
  5. I was recommended this web site by means of my cousin.
    I am now not certain whether this post is written through him as nobody else recognise such precise about my difficulty. You're amazing! Thank you!

    Selenium training in bangalore
    Selenium training in Chennai
    Selenium training in Bangalore
    Selenium training in Pune
    Selenium Online training

    ReplyDelete
  6. Thank you so much for a well written, easy to understand article on this. It can get really confusing when trying to explain it – but you did a great job. Thank you!
    python Course in Pune
    python Course institute in Chennai
    python Training institute in Bangalore

    ReplyDelete

  7. thanks for your information really good and very nice web design company in velachery

    ReplyDelete
  8. Aluminium Composite Panel or ACP Sheet is used for building exteriors, interior applications, and signage. They are durable, easy to maintain & cost-effective with different colour variants.

    ReplyDelete
  9. This is the first & best article to make me satisfied by presenting good content. I feel so happy and delighted.By Learn Digital Marketing Course Training in Chennai it will help to get Digital Marketing Training with Placement Institute in Chennai. If you Learn Social Media Marketing Training with Placement Institute in Chennai, you will get job soon.

    Learn Best Digital Marketing Course Training in Chennai in professional institute to get reputed job.

    ReplyDelete
  10. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful .Manual Testing Training in Bangalore

    ReplyDelete
  11. I have read your blog its very attractive and impressive. I like it your blog. SELENIUM training in bangalor

    ReplyDelete
  12. Great post!I am actually getting ready to across this information,i am very happy to this commands.Also great blog here with all of the valuable information you have.Well done,its a great knowledge.DOTNET training in bangalore

    ReplyDelete
  13. Thanks for one marvelous posting! I enjoyed reading it; you are a great author. I will make sure to bookmark your blog and may come back someday. I want to encourage that you continue your great post.Microsoft Dynamics CRM Training in Bangalore

    ReplyDelete
  14. Thank you for your post. This is excellent information. It is amazing and wonderful to visit your site.windows azure cloud computing training in bangalore

    ReplyDelete
  15. Really very happy to say, your post is very interesting to read. I never stop myself to say something about it. You’re doing a great job. Keep it up…

    Became an Expert In Google Cloud Platform Training in Bangalore! Learn from experienced Trainers and get the knowledge to crack a coding interview, @Softgen Infotech Located in BTM Layout.

    ReplyDelete
  16. Post is very useful. Thank you, this useful information.

    Start your journey with In Software Training in Bangalore and get hands-on Experience with 100% Placement assistance from experts Trainers @eTechno Soft Solutions Located in BTM Layout Bangalore.

    ReplyDelete
  17. Thanks for the interesting blog that you have implemented here. Very helpful and innovative. Waiting for your next upcoming article.
    Java training in chennai
    Java training institute in chennai
    Java course in chennai
    Java training classes
    Java training
    Java programming classes
    core java coure
    <a

    ReplyDelete
  18. Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

    Big Data Hadoop Training In Chennai | Big Data Hadoop Training In anna nagar | Big Data Hadoop Training In omr | Big Data Hadoop Training In porur | Big Data Hadoop Training In tambaram | Big Data Hadoop Training In velachery


    ReplyDelete
  19. Awesome blog. I enjoyed reading your articles. This is truly a great read for me. I have bookmarked it and I am looking forward to reading new articles. Keep up the good work! data science course in coimbatore

    ReplyDelete
  20. I am so proud of you and your efforts and work make me realize that anything can be done with patience and sincerity. Well I am here to say that your work has inspired me without a doubt.
    python training in chennai

    python online training in chennai

    python training in bangalore

    python training in hyderabad

    python online training

    python flask training

    python flask online training

    python training in coimbatore




    ReplyDelete
  21. It was really nice blog with lot of innovative thing inside this, I really enjoyable i would like to thank for sharing this valuable content. I was so glad to see this wonderful blog. keep updating this type of blog. amazon web services aws training in chennai

    microsoft azure training in chennai

    workday training in chennai

    android-training-in chennai

    ios training in chennai

    ReplyDelete
  22. Thanks for posting the best information and the blog is very helpful.python course in Bangalore

    ReplyDelete
  23. Generally excellent review. I absolutely love this site. Much appreciated! best interiors

    ReplyDelete