express not installed on my machine - node.js

I downloaded node.js onto my linux fedora core 18 machine.
After that using npm -g install express installed express. The problem is I am unable to find the express file to be supplied to Nodeclipse in the preference.
Hence, my application using express is not able to compile saying express not found.
Am I missing anything here?

try installing it with this command and see if it works:
npm install -g express
then go to cd myapp
npm link express
this could do the trick..

Nodeclipse is using express executable only for wizard. Everything else works as for node.js from command line (try node myapp.js)
As advised by #isaacs in Express module not found when installed with NPM, do npm install express for local project folder.

Related

Cant install express on Windows

I have been trying to install express dependencies for a few hours now and can't seem to get it working. I used the express generator downloaded with npm install express-generator -g and get an error related to privileges. I have tried running everything I can think of as admin but without luck. I installed node and express on the Windows subsystem Linux with the same error.
log

nvm-windows: not able to run globally installed software

I have installed different version of node using nvm on windows 7.
Currently I am using node v8.0.0. I installed express globally
npm install -g express
But when I try to create a new app using express testapp, I get the
following error message:
'express' is not recognized as an internal or extenal command.
This problem is with all the globally installed node modules.
got it! I have to install express-generator and then give the express command

'express' is not executable

This is quite basic. Many examples show terminal commands such as: 'express name-of-directory-to-be-created'. Yet on my system, though I've installed node.js (and command: node -v works, and npm -v works), command: express fails with: command not found Further investigation shows that, on my macbook air, all incidences of express.js are not executable. I believe express was installed using npm express or npm -g express. Please, what is going on? Are the examples correct? ( There are several, all from various sources. ) How may I execute
express directory
Thanks in advance.
This usually happens on windows.
You need to install express globally and the location where npm modules get installed should be added to PATH(environment variable).
To install express globally type npm install -g express
Also it looks like you are trying to use express-generator.If yes you should install it similarly.
npm install -g express-generator
In windows by default npm modules are installed at "C:\Users\u_name\AppData\Roaming\npm"
Edit your PATH environment variable and append your npm path at the end.

Setting up node.js on Ubuntu 12.04 (with eclipse/nodeclipse/enide)

I'm trying to set up node.js on my Ubuntu 12.04 machine. I want to be able to use it through Eclipse but the process seems confusing.
So far what I have done.
Installed node.js. Shows v5.8.0 on running 'node -v'
Installed npm. Shows 3.7.3 on running 'npm -v'
Installed Express using 'npm install -g express'
Added this to my .bashrc file (I've installed node in ~/node)
export PATH=$HOME/node/bin:$PATH
export NODE_PATH=$HOME/node/lib/node_modules
I'm confused about what to do next. I installed Enide Studio 2015 through Eclipse Marketplace.
Switched to the Node perspective.
Created a new Node.js Express Project
But now I don't see the node project structure.
I also get a bunch of errors like:
- Node.js executable can't be found
What am I doing wrong, or what have I not done?
Alternatively, I installed the linux version of enide from here: http://www.nodeclipse.org/
This contains an eclipse file, but on trying to open the eclipse file it says "there is no application installed for executable files". That's strange because my regular install of eclipse opens just fine. Also I'm running a 32 bit system so I've ensured the files are 32 bit, not 64 bit.
Please help!
if you have node and npm working do the following:
Install express generator:
sudo npm install express-generator -g
Read the documentation about the express generator at http://expressjs.com/en/starter/generator.html
Create an express application:
express myapp
Install dependencies:
cd myapp
npm install
Run the application:
npm start
or
node ./bin/www
Open you browser and navigate to http://localhost:3000
Ok figured it out. I had to set up the node.js path in Eclipse under Preferences>Nodeclipse.

Why is Express not working at all?

I have been following the steps on this I got as far as
npm install -g express-generator
but then nothing happens when I try to create an express project. I go to the directory I want it to be in and type
express nodetest1
and nothing happens. It just returns to the next line. It seems like everything installed correctly.
Edit: My link was to the wrong tutorial. This is the right one now.
Did you try starting the server? The express-generator only generates the project.
Change to the directory of the created project and do npm install followed by npm start to start the server.
Turns out it was caused by nodejs, not Express. When I installed the latest version usinv nvm instead of apt-get, express started working.
What you want is
npm install -g express
There is a generator included in the main package.
So then you can use
express nodetest1
and everything works!

Resources