SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
-
Dec 5, 2013, 08:01 #1
- 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?
-
Dec 13, 2013, 09:25 #2
- 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)
-
Dec 29, 2013, 12:06 #3
- 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.
-
Dec 29, 2013, 12:08 #4
- 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