I'm confused by this problem
My OS is
CentOS 7
my account can exec sudo
I download the nodejs node-v0.10.31-linux-x64.tar.gz for 64-bit linux from the official nodejs site and put it under the /usr/tools, unzip the file and then put the node path to PATH, the npm and node exec file is in the folder /usr/tools/node-v10/bin
the result like
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/lawrence/bin:/usr/tools/node-v10/bin
I exec the command:
sudo npm install -g bower or the sudo npm install bower
the error occurs:
sudo: npm: command not found
and when exec the command:
npm install -g bower or the npm install bower
the error occurs like:
npm ERR! Error: EACCES, mkdir '/usr/tools/node-v10/lib/node_modules/bower'
npm ERR! { [Error: EACCES, mkdir '/usr/tools/node-v10/lib/node_modules/bower']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/tools/node-v10/lib/node_modules/bower',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/tools/node-v10/lib/node_modules/bower',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/tools/node-v10/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/tools/node-v10/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.10.0-123.6.3.el7.x86_64
npm ERR! command "/usr/tools/node-v10/bin/node" "/usr/tools/node-v10/bin/npm" "install" "bower" "-g"
npm ERR! cwd /usr/tools/node-v10/bin
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! path /usr/tools/node-v10/lib/node_modules/bower
npm ERR! fstream_path /usr/tools/node-v10/lib/node_modules/bower
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/tools/node-v10/lib/node_modules/bower'
npm ERR! fstream_stack /usr/tools/node-v10/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/tools/node-v10/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.10.0-123.6.3.el7.x86_64
npm ERR! command "/usr/tools/node-v10/bin/node" "/usr/tools/node-v10/bin/npm" "install" "bower" "-g"
npm ERR! cwd /usr/tools/node-v10/bin
npm ERR! node -v v0.10.31
npm ERR! npm -v 1.4.23
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /usr/tools/node-v10/bin/npm-debug.log
npm ERR! not ok code 0
Related
I type npm install -g karma and get the following result every time I try:
npm ERR! tar.unpack untar error /Users/Sasha/.npm/karma/0.13.10/package.tgz
npm ERR! Darwin 14.3.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "karma"
npm ERR! node v4.1.1
npm ERR! npm v2.14.4
npm ERR! path /usr/local/lib/node_modules/karma
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/karma'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/karma']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/usr/local/lib/node_modules/karma',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/karma',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:82:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/Sasha/npm-debug.log
Please help!Cannot proceed with my tutorial book!
It's a permissions error. Run the command as the root user (as it clearly suggests in the error):
sudo npm install -g karma
I created a new user on my Mac and tried this. This normally works in my other account. This new user is an administrator also.
npm ERR! tar.unpack untar error /Users/test/.npm/webpack/1.11.0/package.tgz
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "install" "-g" "webpack"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! path /usr/local/lib/node_modules/webpack
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/usr/local/lib/node_modules/webpack'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/usr/local/lib/node_modules/webpack']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/local/lib/node_modules/webpack',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/local/lib/node_modules/webpack',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR! '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:95:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/test/WebstormProjects/babel-test/npm-debug.log
I am not very good with the UNIX stuff and things, I just wish these things would be more easy.
From the looks of it, since it says EACCES, it is probably getting an access denied from the system. If you are installing globally on unix you must use sudo.
$ sudo npm install -g webpack
Start using nvm and it will save you from using sudo at all.
https://github.com/creationix/nvm
I am learning Node js through nodeschool. I install different package but once i upgrade the version of NPM. I am unable to install package. I am getting this error.
npm ERR! Error: EACCES, mkdir '/usr/lib/node_modules/scope-chains-closures'
npm ERR! { [Error: EACCES, mkdir '/usr/lib/node_modules/scope-chains-closures']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/usr/lib/node_modules/scope-chains-closures',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/usr/lib/node_modules/scope-chains-closures',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23',
npm ERR! '/usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'Object.oncomplete (fs.js:108:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 3.13.0-53-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "scope-chains-closures"
npm ERR! cwd /home/pjain/workspace/Node
npm ERR! node -v v0.10.38
npm ERR! npm -v 1.4.28
npm ERR! path /usr/lib/node_modules/scope-chains-closures
npm ERR! fstream_path /usr/lib/node_modules/scope-chains-closures
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/scope-chains-closures'
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:36:23
npm ERR! fstream_stack /usr/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53
npm ERR! fstream_stack Object.oncomplete (fs.js:108:15)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/pjain/workspace/Node/npm-debug.log
Try running your npm command as:
sudo npm install <package-name>
Am trying to install appium in ubuntu and got the below error.I searched so many articles and installed node through linuxbrew and even changed the permission also but still getting the below error.Can any one help please
npm ERR! tar.unpack untar error /home/ubuntu/.npm/appium/1.3.6/package.tgz
npm ERR! Linux 3.13.0-44-generic
npm ERR! argv "node" "/home/ubuntu/.linuxbrew/bin/npm" "install" "-g" "appium"
npm ERR! node v0.12.0
npm ERR! npm v2.5.1
npm ERR! path /home/ubuntu/lib/node_modules/appium
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! Error: EACCES, mkdir '/home/ubuntu/lib/node_modules/appium'
npm ERR! at Error (native)
npm ERR! { [Error: EACCES, mkdir '/home/ubuntu/lib/node_modules/appium']
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! path: '/home/ubuntu/lib/node_modules/appium',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/home/ubuntu/lib/node_modules/appium',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/home/ubuntu/.linuxbrew/lib/node_modules/npm/node_modules
/fstream/lib/dir-writer.js:36:23',
npm ERR! '/home/ubuntu/.linuxbrew/lib/node_modules/npm/node_modules/mkdirp/index.js:46:53',
npm ERR! 'FSReqWrap.oncomplete (fs.js:99:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/npm-debug.log
I have tried npm cache clean also but still not working.
What does linuxbrew doctor return?
Try to bash reset.sh --hardcore to completely reset Appium server and all npm modules
I am having a problem running npm install zerorpc without sudo access.
a dependency install attempt yum install libpq-dev
does
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:
Error: rpmdb open failed
for the npm install attempt I get the error
-- any ideas on how to install zerorpc with out sudo access?
npm http GET https://registry.npmjs.org/zerorpc
npm http 304 https://registry.npmjs.org/zerorpc
npm ERR! Error: EACCES, mkdir '/var/lib/openshift/53475f0f50044611030002fb/node_modules'
npm ERR! { [Error: EACCES, mkdir '/var/lib/openshift/53475f0f50044611030002fb/node_modules']
npm ERR! errno: 3,
npm ERR! code: 'EACCES',
npm ERR! path: '/var/lib/openshift/53475f0f50044611030002fb/node_modules',
npm ERR! fstream_type: 'Directory',
npm ERR! fstream_path: '/var/lib/openshift/53475f0f50044611030002fb/node_modules/zerorpc',
npm ERR! fstream_class: 'DirWriter',
npm ERR! fstream_stack:
npm ERR! [ '/opt/rh/nodejs010/root/usr/lib/node_modules/fstream/lib/writer.js:171:23',
npm ERR! '/opt/rh/nodejs010/root/usr/lib/node_modules/mkdirp/index.js:37:53',
npm ERR! 'Object.oncomplete (fs.js:107:15)' ] }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 2.6.32-431.11.2.el6.bz844450.x86_64
npm ERR! command "node" "/opt/rh/nodejs010/root/usr/bin/npm" "install" "zerorpc"
npm ERR! cwd /var/lib/openshift/53475f0f50044611030002fb
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.17
npm ERR! path /var/lib/openshift/53475f0f50044611030002fb/node_modules
npm ERR! fstream_path /var/lib/openshift/53475f0f50044611030002fb/node_modules/zerorpc
npm ERR! fstream_type Directory
npm ERR! fstream_class DirWriter
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, mkdir '/var/lib/openshift/53475f0f50044611030002fb/node_modules'
npm ERR! fstream_stack /opt/rh/nodejs010/root/usr/lib/node_modules/fstream/lib/writer.js:171:23
npm ERR! fstream_stack /opt/rh/nodejs010/root/usr/lib/node_modules/mkdirp/index.js:37:53
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15)
npm ERR! Error: EACCES, open 'npm-debug.log'
npm ERR! { [Error: EACCES, open 'npm-debug.log'] errno: 3, code: 'EACCES', path: 'npm-debug.log' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Linux 2.6.32-431.11.2.el6.bz844450.x86_64
npm ERR! command "node" "/opt/rh/nodejs010/root/usr/bin/npm" "install" "zerorpc"
npm ERR! cwd /var/lib/openshift/53475f0f50044611030002fb
npm ERR! node -v v0.10.5
npm ERR! npm -v 1.2.17
npm ERR! path npm-debug.log
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, open 'npm-debug.log'
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /var/lib/openshift/53475f0f50044611030002fb/npm-debug.log
npm ERR! not ok code 0