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.
Related
Sorry for yet another nube question but I haven't touched JS in years..
I'm confused with node.js, npm ls -g --depth 0 clearly shows ibm_db listed and yet a
var ibmdb = require('ibm_db')
from within a node cli,
errors with can't find module ibm_db.
Netbeans search found the Node.js files without issue..
I know it's going to be something annoyingly obvious, but just can't see it.
OS is ubuntu server..
I've tried 3 install commands:
As User-
npm install ibm_db
npm install -g ibm_db
As root-
npm install -g ibm_db
DB2CLI is working correctly.
Anyone any ideas?
After numerous attempts at installing Express, my only output has been as stated in the title. Your help would be much appreciated. Below is a list of commands I've tried.
With my working directory being the directory I want the app to be in,
Trying 'sudo npm install express', I get:
sudo npm install express
Followed by 'sudo npm install -g express-generator, I get:
sudo npm install -g express-generator
Now, running 'express', I get:
"-bash: express: command not found"
I have read through the top answers of 4 to 5 posts to no avail. Please help me!
Your question is not readable. I try to answer: you are on osx, I advice you to install nvm. You can make a google search. Then you can install node.js by: nvm install node and finally you can type nvm use node. This solves your sudo problem and you can install express-generator and other packages without a sudo.
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
I am using ubuntu 14.04 LTS.
I installed nodejs as mentioned here, and then I installed express by running sudo npm install -g express#3 it got installed but when I try to create an app or even try to look at the version by running express -v or express -V it doesn't give any sort of output.
Any help is much appreciated, Thanks in advance!
Installation of node in ubuntu is fairly a straight forward process. I don't know what gone wrong with your earlier attempt.anyway you can install it again if you wish. there are two ways to install node.
Download and install from nodejs.or
Use NVM(node version manager)
I always prefer the NVM method because it not only allows you to switch between versions but also avoids some of issues that otherwise you may face later. example, can't install npm packages globally without sudo.
Before you start remove your old installation
sudo rm -r ~/.npm
Now install nvm
curl https://raw.githubusercontent.com/creationix/nvm/v0.16.1/install.sh | bash
To activate nvm
source ~/.nvm/nvm.sh
Then install node
nvm install 0.10
nvm use 0.10
To set a default Node version to be used in any new shell
nvm alias default 0.10
Check everything done properly
node --version
Then install express
npm install -g express
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