SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help needed to install Node.js on Windows 7

    Where can I go to get help with my node.js install on Windows 7?
    I'm evaluating the Jumpstart book on Node.js by Don Nguyen and stuck on installing Express.

    Whenever I type and run command 'sudo npm install -g express@2.5.8'
    I get three ... and no feedback
    how can I confirm that I have node.js installed correctly?

    Thanks for your help.

  2. #2
    Utopia, Inc. silver trophy
    ScallioXTX's Avatar
    Join Date
    Aug 2008
    Location
    The Netherlands
    Posts
    8,900
    Mentioned
    138 Post(s)
    Tagged
    2 Thread(s)
    sudo npm is a linux/mac command. Are you sure you're following the correct part of the book?
    Rémon - Hosting Advisor

    Minimal Bookmarks Tree
    My Google Chrome extension: browsing bookmarks made easy

  3. #3
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ScallioXTX View Post
    sudo npm is a linux/mac command. Are you sure you're following the correct part of the book?
    I'm following the first chapter from the sample pdf. I haven't purchased the full book yet as I'm evaluating whether or not I'm at the right level.

    Excerpt From Who Should Read This Book:

    The second potential reader is the server-side engineer who uses another language
    such as PHP, Python, Ruby, Java, or .NET. The main benefit you’ll derive is seeing
    how your existing architectural, design, and pattern knowledge is applied to the
    world of Node.js. You may have little to no knowledge of JavaScript, but this should
    pose no big hindrance. By design, it’s an easy language to learn, and we will have
    covered many examples of both its syntax and idiosyncratic features by the end of
    the book.

    From the 'Assembling the Pieces' section in Chapter 1/, in the Installation part. I installed the Node.js from windows .msi
    after I installed. I ran the program (using node.js command window..) and did test; console.log('Hello World') it returned the correct results
    Hello World
    undefined

    then I just followed the rest of the instructions but it never mentioned that if in Linux, run this command. I just ran in the Node.js command window


    I'm an ASP.Net Web Forms Developer C# looking to make a switch to do more pure client side development (JS, JQuery, Knockout, etc. ).

    Node.js is a hot topic and everything I read and hear about on it is very positive. I want to learn all I can about it.
    Unfortunately, my development environment at my home office (side business) and in my Web Developer full time job systems are on the MS/Windows stack.

    Any suggestions on where I should go to learn node.js on Windows platform?
    Do you think this book can help an ASP.Net C# MS Web Developer learn the basics of node.js?
    Thanks

  4. #4
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Sudo is a linux command, npm is Node Package Manager*, you either need npm in the path or be located at its source to run it.

    * Despite what the author thinks.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  5. #5
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by jboconne View Post
    Node.js is a hot topic and everything I read and hear about on it is very positive. I want to learn all I can about it.
    Without trying to disillusion you about this, it's worth noting that Node has a few things that it is very good at, like processing interactions between clients and the server really fast. It is not a new language/platform that will replace .NET/PHP/Ruby/Python/Perl/What-have-you - it's a different platform that does very well within a set of use cases.

    Having said that, I love Node - I love being able to program on the server side and client side in the same language, it takes a lot of the pain away that you normally have when switching between different languages. That, and JavaScript programming is a lot of fun, a lot more fun (in my very humble opinion) than many of the other web languages because it's just so versatile and flexible.

    Quote Originally Posted by jboconne View Post
    Unfortunately, my development environment at my home office (side business) and in my Web Developer full time job systems are on the MS/Windows stack.

    Any suggestions on where I should go to learn node.js on Windows platform?
    Do you think this book can help an ASP.Net C# MS Web Developer learn the basics of node.js?
    Thanks
    If you want to run Node on Windows it's absolutely possible, I do it at home and at work and haven't run in to any problems yet. Learning Node isn't really a platform specific thing, there are some things that work slightly differently on the various platforms because some things on Windows and Unix based systems are fundamentally different. Node should abstract a lot of these things away from you so you don't have to deal with it.

    NPM is installed with Node now, so no separate install is required ... so if Node is working correctly you should already have NPM in your Path as well, as it is installed in the same location. So all you need to do when you see commands used in the book that start with "sudo" is leave that part off as that is a Unix specific command.

    So this should work fine:
    Code:
    C:\> npm install -g express@2.5.8
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  6. #6
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Sudo is a linux command, npm is Node Package Manager*, you either need npm in the path or be located at its source to run it.

    * Despite what the author thinks.
    Off Topic:

    I was thinking of getting this book and having a read. What does the author seem to think it means? (I didn't find any weird references to meanings for npm, do you have the full book?)
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  7. #7
    ¬.¬ shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AussieJohn View Post
    Off Topic:

    I was thinking of getting this book and having a read. What does the author seem to think it means? (I didn't find any weird references to meanings for npm, do you have the full book?)
    Off Topic:

    I meant the author of npm. It would have been easier if he didn't try to be cute and funny. Instead of npm meaning Node Package Manager, which would have been logical and less confusing, the author says it means: "npm is not an acronym".
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  8. #8
    Under Construction silver trophybronze trophy AussieJohn's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    776
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Off Topic:

    I meant the author of npm. It would have been easier if he didn't try to be cute and funny. Instead of npm meaning Node Package Manager, which would have been logical and less confusing, the author says it means: "npm is not an acronym".
    Off Topic:

    Aha, I didn't actually know that. I have always seen it referred to as the Node Package Manager, which would be the logical conclusion to draw if you were presented with and "npm" a program that installs and manages packages for Node
    var details = {
    . . web: "afterlight.com.au",
    . . photos: "jvdl.id.au",
    . . psa: "usethelatestversion.com"
    }

  9. #9
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by logic_earth View Post
    Sudo is a linux command, npm is Node Package Manager*, you either need npm in the path or be located at its source to run it.

    * Despite what the author thinks.
    Thanks for pointing me in the right direction.
    Now I understand. Since I installed the windows msi of node.js, I didn't realize, at first, that it took care of the npm installation. Poking around the node.js directory on my win7 machine, i saw that it was installed.

    Then following the steps in the book sample, I tried to run 'npm install -g express@2.5.8' within the node.js command window; I received the following message:
    > npm install -g express@2.5.8
    npm should be run outside of the node repl, in your normal shell.
    (Press Control-D to exit.)

    then I ran the same command in reg. windows command; and it worked.
    Now I see how it works in a win7 environment
    Thanks again.

    Jeff

  10. #10
    SitePoint Member
    Join Date
    Dec 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by AussieJohn View Post
    Without trying to disillusion you about this, it's worth noting that Node has a few things that it is very good at, like processing interactions between clients and the server really fast. It is not a new language/platform that will replace .NET/PHP/Ruby/Python/Perl/What-have-you - it's a different platform that does very well within a set of use cases.
    Thanks for the insight here. processing interactions between clients and the server is a major goal of mine coming from a ASP.Net Web forms background. Also good to know that it will not or doesn't replace my .Net skills. I agree with you on the use case statement wholeheartedly. It has to fit the customer's/user's need and requirements.

    Quote Originally Posted by AussieJohn View Post
    Having said that, I love Node - I love being able to program on the server side and client side in the same language, it takes a lot of the pain away that you normally have when switching between different languages. That, and JavaScript programming is a lot of fun, a lot more fun (in my very humble opinion) than many of the other web languages because it's just so versatile and flexible..
    Good to hear! I'm a novice JS programmer at best, looking to increase my JS skills. Thanks for your words of encouragement...

    Quote Originally Posted by AussieJohn View Post
    If you want to run Node on Windows it's absolutely possible, I do it at home and at work and haven't run in to any problems yet. Learning Node isn't really a platform specific thing, there are some things that work slightly differently on the various platforms because some things on Windows and Unix based systems are fundamentally different. Node should abstract a lot of these things away from you so you don't have to deal with it.

    NPM is installed with Node now, so no separate install is required ... so if Node is working correctly you should already have NPM in your Path as well, as it is installed in the same location. So all you need to do when you see commands used in the book that start with "sudo" is leave that part off as that is a Unix specific command.

    So this should work fine:
    Code:
    C:\> npm install -g express@2.5.8
    You're right. I did some Linux stuff in school awhile ago while pursuing my new career in web programming but ever since I graduated from school and landed my current full time position 5 years ago, the only work I've done has been is in .Net. Maybe I should brush the dust off those old Linux books I have from school....

    Aussie John, thanks for your input and again, your words of encouragement.

    Jeff

    btw, I've got everything working fine now and moving along with the rest of the materials in Chapter 1 quite nicely thanks to you and logic_earth

  11. #11
    SitePoint Author
    Join Date
    Nov 2012
    Posts
    48
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    jboconne, in addition to AussieJohn's excellent answer I would say:

    1. As a .NET developer, your existing programming skillset should offer you all the tools you need to handle the technical challenges of the book

    2. However if your aspiration is

    looking to make a switch to do more pure client side development (JS, JQuery, Knockout, etc. ).
    Then my personal opinion is that Node.js might not quite be the right fit. Although it is JavaScript, server side JavaScript is a different beast to client side JavaScript. If you do wish to specialize in client side work, as much as it pains me to say it, there are likely more appropriate books than mine.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •