简体   繁体   中英

Unable to install packages through npm

Installing packages via npm shows the following message and nothing is installed..

sakthiganesh@ubuntu:~$ npm install express
express@2.3.8./node_modules/express
├── mime@1.2.2 ()
├── connect@1.4.1 ()
└── qs@0.1.0

any solutions?

Express are installed already in your case. By default npm installs modules in the node_modules subdirectory of the current dir. If you want to install module globally use commands with -g key:

sudo npm install -g express

But good practice are placing modules required for your application in the application directory. Go to directory, where your javascript file took place and run npm install without -g :

cd /var/www/my_app
npm install express

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM