Angular installation failure in Ubuntu 16.04 (Xenial Xerus)












-3















Angular CLI always shows an error while running the installation command and also the ng shows no such command found. How do I get rid of this problem?




shivashish-Inspiron-3521% cd Angular-project
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% sudo npm install -g angular/cli
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/angular/cli.git
npm ERR!
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /home/shivashish/.npm/_logs/2018-11-25T10_01_17_050Z-debug.log
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% ng new app
zsh: command not found: ng
shivashish-Inspiron-3521% node -v
v8.13.0



I run again and now I get this:



shivashish-Inspiron-3521% npm install -g @angular/cli
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/shivashish/.npm/_logs/2018-11-25T13_53_57_814Z-debug.log









share|improve this question

























  • I changed it to @angular but still the same problem.

    – Shivashish Ratnam
    Nov 25 '18 at 13:56











  • hi, please read carefully my answer; you also need to use sudo otherwise you'll have the permission problem

    – adrhc
    Nov 27 '18 at 14:07


















-3















Angular CLI always shows an error while running the installation command and also the ng shows no such command found. How do I get rid of this problem?




shivashish-Inspiron-3521% cd Angular-project
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% sudo npm install -g angular/cli
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/angular/cli.git
npm ERR!
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /home/shivashish/.npm/_logs/2018-11-25T10_01_17_050Z-debug.log
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% ng new app
zsh: command not found: ng
shivashish-Inspiron-3521% node -v
v8.13.0



I run again and now I get this:



shivashish-Inspiron-3521% npm install -g @angular/cli
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/shivashish/.npm/_logs/2018-11-25T13_53_57_814Z-debug.log









share|improve this question

























  • I changed it to @angular but still the same problem.

    – Shivashish Ratnam
    Nov 25 '18 at 13:56











  • hi, please read carefully my answer; you also need to use sudo otherwise you'll have the permission problem

    – adrhc
    Nov 27 '18 at 14:07
















-3












-3








-3








Angular CLI always shows an error while running the installation command and also the ng shows no such command found. How do I get rid of this problem?




shivashish-Inspiron-3521% cd Angular-project
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% sudo npm install -g angular/cli
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/angular/cli.git
npm ERR!
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /home/shivashish/.npm/_logs/2018-11-25T10_01_17_050Z-debug.log
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% ng new app
zsh: command not found: ng
shivashish-Inspiron-3521% node -v
v8.13.0



I run again and now I get this:



shivashish-Inspiron-3521% npm install -g @angular/cli
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/shivashish/.npm/_logs/2018-11-25T13_53_57_814Z-debug.log









share|improve this question
















Angular CLI always shows an error while running the installation command and also the ng shows no such command found. How do I get rid of this problem?




shivashish-Inspiron-3521% cd Angular-project
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% sudo npm install -g angular/cli
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/angular/cli.git
npm ERR!
npm ERR! Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128

npm ERR! A complete log of this run can be found in:
npm ERR! /home/shivashish/.npm/_logs/2018-11-25T10_01_17_050Z-debug.log
shivashish-Inspiron-3521% ls
shivashish-Inspiron-3521% ng new app
zsh: command not found: ng
shivashish-Inspiron-3521% node -v
v8.13.0



I run again and now I get this:



shivashish-Inspiron-3521% npm install -g @angular/cli
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/shivashish/.npm/_logs/2018-11-25T13_53_57_814Z-debug.log






installation angular-cli ubuntu-16.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 30 '18 at 16:21









Peter Mortensen

13.7k1986113




13.7k1986113










asked Nov 25 '18 at 10:21









Shivashish RatnamShivashish Ratnam

24




24













  • I changed it to @angular but still the same problem.

    – Shivashish Ratnam
    Nov 25 '18 at 13:56











  • hi, please read carefully my answer; you also need to use sudo otherwise you'll have the permission problem

    – adrhc
    Nov 27 '18 at 14:07





















  • I changed it to @angular but still the same problem.

    – Shivashish Ratnam
    Nov 25 '18 at 13:56











  • hi, please read carefully my answer; you also need to use sudo otherwise you'll have the permission problem

    – adrhc
    Nov 27 '18 at 14:07



















I changed it to @angular but still the same problem.

– Shivashish Ratnam
Nov 25 '18 at 13:56





I changed it to @angular but still the same problem.

– Shivashish Ratnam
Nov 25 '18 at 13:56













hi, please read carefully my answer; you also need to use sudo otherwise you'll have the permission problem

– adrhc
Nov 27 '18 at 14:07







hi, please read carefully my answer; you also need to use sudo otherwise you'll have the permission problem

– adrhc
Nov 27 '18 at 14:07














1 Answer
1






active

oldest

votes


















0














This is because it should be @angular/cli instead of angular/cli. The correct command is:



sudo npm install -g @angular/cli


according to Step 1: Install the Angular CLI



PS: please don't forget to use sudo when installing globally (-g parameter) on linux






share|improve this answer


























  • I changed it , but the same problem arise again.

    – Shivashish Ratnam
    Nov 25 '18 at 13:55











  • hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

    – adrhc
    Nov 25 '18 at 13:57











  • I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

    – adrhc
    Nov 25 '18 at 14:01













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466557%2fangular-installation-failure-in-ubuntu-16-04-xenial-xerus%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














This is because it should be @angular/cli instead of angular/cli. The correct command is:



sudo npm install -g @angular/cli


according to Step 1: Install the Angular CLI



PS: please don't forget to use sudo when installing globally (-g parameter) on linux






share|improve this answer


























  • I changed it , but the same problem arise again.

    – Shivashish Ratnam
    Nov 25 '18 at 13:55











  • hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

    – adrhc
    Nov 25 '18 at 13:57











  • I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

    – adrhc
    Nov 25 '18 at 14:01


















0














This is because it should be @angular/cli instead of angular/cli. The correct command is:



sudo npm install -g @angular/cli


according to Step 1: Install the Angular CLI



PS: please don't forget to use sudo when installing globally (-g parameter) on linux






share|improve this answer


























  • I changed it , but the same problem arise again.

    – Shivashish Ratnam
    Nov 25 '18 at 13:55











  • hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

    – adrhc
    Nov 25 '18 at 13:57











  • I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

    – adrhc
    Nov 25 '18 at 14:01
















0












0








0







This is because it should be @angular/cli instead of angular/cli. The correct command is:



sudo npm install -g @angular/cli


according to Step 1: Install the Angular CLI



PS: please don't forget to use sudo when installing globally (-g parameter) on linux






share|improve this answer















This is because it should be @angular/cli instead of angular/cli. The correct command is:



sudo npm install -g @angular/cli


according to Step 1: Install the Angular CLI



PS: please don't forget to use sudo when installing globally (-g parameter) on linux







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 28 '18 at 17:44

























answered Nov 25 '18 at 11:09









adrhcadrhc

505314




505314













  • I changed it , but the same problem arise again.

    – Shivashish Ratnam
    Nov 25 '18 at 13:55











  • hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

    – adrhc
    Nov 25 '18 at 13:57











  • I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

    – adrhc
    Nov 25 '18 at 14:01





















  • I changed it , but the same problem arise again.

    – Shivashish Ratnam
    Nov 25 '18 at 13:55











  • hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

    – adrhc
    Nov 25 '18 at 13:57











  • I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

    – adrhc
    Nov 25 '18 at 14:01



















I changed it , but the same problem arise again.

– Shivashish Ratnam
Nov 25 '18 at 13:55





I changed it , but the same problem arise again.

– Shivashish Ratnam
Nov 25 '18 at 13:55













hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

– adrhc
Nov 25 '18 at 13:57





hm, thanks; please create an update section to your post in order to print the new logs. My current answer is indeed correct for your current situation so that's why I advice for a separate update section, thank you

– adrhc
Nov 25 '18 at 13:57













I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

– adrhc
Nov 25 '18 at 14:01







I notice that the updated error logs show that you no longer use sudo in the front of the command; that's the permission problem.

– adrhc
Nov 25 '18 at 14:01






















draft saved

draft discarded




















































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.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53466557%2fangular-installation-failure-in-ubuntu-16-04-xenial-xerus%23new-answer', 'question_page');
}
);

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







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin