error while installing “npm install -g ionic cordova”
up vote
1
down vote
favorite
When I install npm install -g ionic cordova It throws below error
npm WARN checkPermissions Missing write access to
/usr/lib/node_modules npm ERR! path /usr/lib/node_modules npm ERR!
code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error:
EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! {
Error: EACCES: permission denied, access '/usr/lib/node_modules' npm
ERR! stack: 'Error: EACCES: permission denied, access
'/usr/lib/node_modules'', npm ERR! errno: -13, npm ERR! code:
'EACCES', npm ERR! syscall: 'access', npm ERR! path:
'/usr/lib/node_modules' } npm ERR! npm ERR! The operation was
rejected by your operating system. npm ERR! It is likely you do not
have the permissions to access this file as the current user npm ERR!
npm ERR! If you believe this might be a permissions issue, please
double-check the npm ERR! permissions of the file and its containing
directories, or try running npm ERR! the command again as
root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in: npm ERR!
/home/javauser/.npm/_logs/2018-05-19T04_42_24_737Z-debug.log
I tried with root user as well.
I am using node v9.11.1 , npm 6.0.1
node.js cordova ionic-framework npm
add a comment |
up vote
1
down vote
favorite
When I install npm install -g ionic cordova It throws below error
npm WARN checkPermissions Missing write access to
/usr/lib/node_modules npm ERR! path /usr/lib/node_modules npm ERR!
code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error:
EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! {
Error: EACCES: permission denied, access '/usr/lib/node_modules' npm
ERR! stack: 'Error: EACCES: permission denied, access
'/usr/lib/node_modules'', npm ERR! errno: -13, npm ERR! code:
'EACCES', npm ERR! syscall: 'access', npm ERR! path:
'/usr/lib/node_modules' } npm ERR! npm ERR! The operation was
rejected by your operating system. npm ERR! It is likely you do not
have the permissions to access this file as the current user npm ERR!
npm ERR! If you believe this might be a permissions issue, please
double-check the npm ERR! permissions of the file and its containing
directories, or try running npm ERR! the command again as
root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in: npm ERR!
/home/javauser/.npm/_logs/2018-05-19T04_42_24_737Z-debug.log
I tried with root user as well.
I am using node v9.11.1 , npm 6.0.1
node.js cordova ionic-framework npm
1
docs.npmjs.com/getting-started/fixing-npm-permissions
– Suraj Rao
May 19 at 5:27
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
When I install npm install -g ionic cordova It throws below error
npm WARN checkPermissions Missing write access to
/usr/lib/node_modules npm ERR! path /usr/lib/node_modules npm ERR!
code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error:
EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! {
Error: EACCES: permission denied, access '/usr/lib/node_modules' npm
ERR! stack: 'Error: EACCES: permission denied, access
'/usr/lib/node_modules'', npm ERR! errno: -13, npm ERR! code:
'EACCES', npm ERR! syscall: 'access', npm ERR! path:
'/usr/lib/node_modules' } npm ERR! npm ERR! The operation was
rejected by your operating system. npm ERR! It is likely you do not
have the permissions to access this file as the current user npm ERR!
npm ERR! If you believe this might be a permissions issue, please
double-check the npm ERR! permissions of the file and its containing
directories, or try running npm ERR! the command again as
root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in: npm ERR!
/home/javauser/.npm/_logs/2018-05-19T04_42_24_737Z-debug.log
I tried with root user as well.
I am using node v9.11.1 , npm 6.0.1
node.js cordova ionic-framework npm
When I install npm install -g ionic cordova It throws below error
npm WARN checkPermissions Missing write access to
/usr/lib/node_modules npm ERR! path /usr/lib/node_modules npm ERR!
code EACCES npm ERR! errno -13 npm ERR! syscall access npm ERR! Error:
EACCES: permission denied, access '/usr/lib/node_modules' npm ERR! {
Error: EACCES: permission denied, access '/usr/lib/node_modules' npm
ERR! stack: 'Error: EACCES: permission denied, access
'/usr/lib/node_modules'', npm ERR! errno: -13, npm ERR! code:
'EACCES', npm ERR! syscall: 'access', npm ERR! path:
'/usr/lib/node_modules' } npm ERR! npm ERR! The operation was
rejected by your operating system. npm ERR! It is likely you do not
have the permissions to access this file as the current user npm ERR!
npm ERR! If you believe this might be a permissions issue, please
double-check the npm ERR! permissions of the file and its containing
directories, or try running npm ERR! the command again as
root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in: npm ERR!
/home/javauser/.npm/_logs/2018-05-19T04_42_24_737Z-debug.log
I tried with root user as well.
I am using node v9.11.1 , npm 6.0.1
node.js cordova ionic-framework npm
node.js cordova ionic-framework npm
edited May 19 at 11:56
Suraj Rao
22.3k75468
22.3k75468
asked May 19 at 5:20
Prashant Patel
61112
61112
1
docs.npmjs.com/getting-started/fixing-npm-permissions
– Suraj Rao
May 19 at 5:27
add a comment |
1
docs.npmjs.com/getting-started/fixing-npm-permissions
– Suraj Rao
May 19 at 5:27
1
1
docs.npmjs.com/getting-started/fixing-npm-permissions
– Suraj Rao
May 19 at 5:27
docs.npmjs.com/getting-started/fixing-npm-permissions
– Suraj Rao
May 19 at 5:27
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
run with sudo in Mac OS or linux
sudo npm install -g ionic cordova
or in windows open cmd with run as administrator
npm install -g ionic cordova
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
add a comment |
up vote
0
down vote
Never use npm with sudo (or as root)! You can create potential backdoor to your system.
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
run with sudo in Mac OS or linux
sudo npm install -g ionic cordova
or in windows open cmd with run as administrator
npm install -g ionic cordova
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
add a comment |
up vote
2
down vote
run with sudo in Mac OS or linux
sudo npm install -g ionic cordova
or in windows open cmd with run as administrator
npm install -g ionic cordova
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
add a comment |
up vote
2
down vote
up vote
2
down vote
run with sudo in Mac OS or linux
sudo npm install -g ionic cordova
or in windows open cmd with run as administrator
npm install -g ionic cordova
run with sudo in Mac OS or linux
sudo npm install -g ionic cordova
or in windows open cmd with run as administrator
npm install -g ionic cordova
answered May 19 at 6:34
user9793769
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
add a comment |
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
This also worked for: npm install -g @angular/cli
– ymerdrengene
Oct 24 at 18:17
add a comment |
up vote
0
down vote
Never use npm with sudo (or as root)! You can create potential backdoor to your system.
add a comment |
up vote
0
down vote
Never use npm with sudo (or as root)! You can create potential backdoor to your system.
add a comment |
up vote
0
down vote
up vote
0
down vote
Never use npm with sudo (or as root)! You can create potential backdoor to your system.
Never use npm with sudo (or as root)! You can create potential backdoor to your system.
answered Nov 19 at 9:19
Ondrej
62
62
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f50422042%2ferror-while-installing-npm-install-g-ionic-cordova%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
docs.npmjs.com/getting-started/fixing-npm-permissions
– Suraj Rao
May 19 at 5:27