node.js - Error while installing express using npm -
i have installed express using
npm install express
but looks in order create apps should install globally. used:
npm install -g express
but received:
npm err! error: eacces, mkdir '/usr/lib/node_modules/express' npm err! { [error: eacces, mkdir '/usr/lib/node_modules/express'] npm err! errno: 3, npm err! code: 'eacces', npm err! path: '/usr/lib/node_modules/express', npm err! fstream_type: 'directory', npm err! fstream_path: '/usr/lib/node_modules/express', npm err! fstream_class: 'dirwriter', npm err! fstream_stack: npm err! [ '/usr/lib/node_modules/fstream/lib/dir-writer.js:36:23', npm err! '/usr/lib/node_modules/mkdirp/index.js:37:53', npm err! 'object.oncomplete (fs.js:107:15)' ] } npm err! npm err! please try running command again root/administrator. npm err! system linux 3.11.2-201.fc19.x86_64 npm err! command "node" "/usr/bin/npm" "install" "-g" "express" npm err! cwd /home/parisa npm err! node -v v0.10.19 npm err! npm -v 1.3.6 npm err! path /usr/lib/node_modules/express npm err! fstream_path /usr/lib/node_modules/express npm err! fstream_type directory npm err! fstream_class dirwriter npm err! code eacces npm err! errno 3 npm err! stack error: eacces, mkdir '/usr/lib/node_modules/express' npm err! fstream_stack /usr/lib/node_modules/fstream/lib/dir-writer.js:36:23 npm err! fstream_stack /usr/lib/node_modules/mkdirp/index.js:37:53 npm err! fstream_stack object.oncomplete (fs.js:107:15) npm err! npm err! additional logging details can found in: npm err! /home/parisa/npm-debug.log npm err! not ok code 0
then after trying sudo:
sudo npm install -g express
i this:
axconfig: unable open axports file /etc/ax25/axports (no such file or directory)
why that???
as error states, don't have permissions create in /usr/lib. stack error: eacces, mkdir '/usr/lib/node_modules/express'
hence install sudo permissions..
sudo npm install -g express
Comments
Post a Comment