I recently installed nodejs version 0.10.26 on ubuntu 64 bit. node -v and npm -v commands run fine and I can see the correct versions. When I do a $ sudo npm install -g express
the installation goes fine. But when I try to create a project with express as $ express myProject I get an error saying
The program 'express' is currently not installed. You can install it
by typing: sudo apt-get install node-express
Do I have to include some path in $PATH in order to run express? Please help.
With Express 4, the application generator was removed and is now available as 'express-generator.' So you need to npm install -g express-generator instead.
Enter the command in your terminal
npm install --save express
Related
My first post here, after reading hours and solving many problems for me:)
Im running macbook OS X El Captain.
I installed Node v8.9.4
I run "sudo npm install -g express-generator" I get the following feedback:
myname-MacBook-Air:todo myname$ sudo npm install -g express-generator
/Users/myname/.npm-global/bin/express -> /Users/myname/.npm-global/lib/node_modules/express-generator/bin/express-cli.js
+ express-generator#4.15.5
updated 1 package in 1.052s
When I now try to run "express newproject", I get the following error:
myname-MacBook-Air:todo myname$ express newproject
-bash: express: command not found
I have a feeling I might have some paths set up the wrong way. I appreciate help!
The executable is installed in
/usr/local/share/npm/bin/
Try add that directory to your path and it will solve the problem.
export PATH=/usr/local/share/npm/bin:$PATH
Install Express Globally
1] npm install express -g
and also install express-generator locally, If it is not working then try to do that by globally
2] npm install express-generator or npm install express-generator -g
I am trying to install express module install, but the issue is that after installation I am still unable to use express.
What I've done:
Install express using cmd - npm install -g express
For some reason it's not installing globally.
Help?
You might want to use the following:
npm install -g express-generator
Source: Issues with installing Express.JS in Windows 7
In later versions of express comand line was migrated to a separate module: express-generetor
use
npm install -g express-generator#3
and could use the express command
First thing I want to clear here that may be this question is duplicate.But I read all the question related on this topic in stack overflow but not got the solution.
Please Help me. I just install Nodejs version in my Laptop on Ubuntu OS.For ensure that nodejs is install on my laptop, Using node -v I found the version of Node js which is 0.12.2
and same for npm I follow same steps and it works for me.But when i install ' express 4 version'. I use which node command and it is working and show the path is /usr/bin/node and same for npm is /usr/bin/npm.
but when i check for express it is not working for me. I have number of time install express-generator using 'sudo npm install -g express-generator' and it install the files but when I use express my_app command it print The program 'express' is currently not installed. You can install it by typing:
sudo apt-get install node-express
Run:
npm install -g express
In most cases you do not need sudo.
I'm having trounble with installing express. After I do npm install express, express is still not visible. I.e. I'm unable to do express appname. I'm running Win7. What is done incorrectly?
UPD. I'm following this tutorial
since express 4.0 the CLI tools are not part of the main express package anymore. if you want to have the generator you have to install it separately:
npm install -g express-generator
see here
If you want to run the :
express appname
command, you should install express the following way :
sudo npm install -g express
or just:
npm install -g express
if you are not on a UNIX system. Otherwise if you already did an :
npm install express
you can run this command:
./node_modules/express/bin/express appname
from your project's root directory.
I'm new in node js, I'm triying to install globally express
npm i -g express
all completes, but when I enter
express --help
it says that it's not inside or outside command, however when i enter supervisor it runs OK. I looked into pathof express and there is no any .cmd file. If the problem is that. How should i fix it?
Please help.
Installing npm install -g express will install express 4.
Express 4 separates the generator from express.
What you need to do is to run:
$ npm install -g express-generator
Then it will work.
As stated in express Readme [1], you need to install express generator separately, using following command:
npm install -g express-generator#3
[1] - https://github.com/visionmedia/express/blob/master/Readme.md