SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Chapter 1 sudo npm install -g express@2.5.8

    I've a couple of questions from right at the start of the book.

    #1
    When I go to the node.js prompt and enter

    > sudo npm install -g express@2.5.8

    I just get three dots in reply:
    ...

    nothing further happens, if I do Ctrl-C I get the ">" prompt again.

    I tried entering

    > npm install -g express@2.5.8

    and got the message

    "npm should be run outside of the node repl, in your normal shell"

    so I go to the node.js command prompt and this time if I enter

    > sudo npm install -g express@2.5.8

    it says

    "sudo is not recognised as an internal or external command"

    however if I just run

    > npm install -g express@2.5.8

    It looks like it worked fine.

    I'm a bit concerned I haven't got something set correctly for this line not to work as it says in the book?

    #2
    It says to modify package.json "for this project" - what project? For my install I have a file

    C:\Program Files (x86)\nodejs\node_modules\npm\package.json

    If I edit this won't it be some sort of global setting, not "for this project"?

    How do I make the change for this project only?

  2. #2
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I am having the same problem

    > sudo npm install -g express@2.5.8

    just outputs:

    ...

    (jump start node.js chap 1 page 47)

  3. #3
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    re #2: If you have already ran "express authentication" from the command line, a new directory will have been created titled 'authentication'.
    Inside that folder is the file to edit.

  4. #4
    SitePoint Member
    Join Date
    Dec 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you are trying to run the command from the node REPL.

    Use the command line instead.


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
  •