Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I installed nodejs with the instructions from this post on ubuntu 13.1 All went smooth. After that I installed express by issuing the command

npm install express

which result in

[email protected] node_modules/express
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected] ([email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])

but when I now type something like

express demo

I get

The program 'express' is currently not installed. You can install it by typing: sudo apt-get install node-express

share|improve this question

1 Answer 1

I answer my own question for the case that someone else stumble over the same problem.

The packages can be installed as local and global where local is default. We should install the package as local when we require it and as global when we want to access it within the shell. To install a package as global simply add -g in my case I run

sudo npm install -g express

and now it works.

Edit

Using -g and require it later can lead to UNMET DEPENDENCY express this can be solved by using -d

sudo npm install -d express
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.