AngularCLI serving problem on Ubuntu 16.04

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I've already installed AngularCLI with npm and then I try serving ng serve --open in the terminal. But the terminal shows an empty screen and then does nothing.
Screenshot of Terminal after serving app



What can I do to serve my Angular app?







share|improve this question






















  • Problem solved! It was because of npm permissions and It must be sudo npm
    – El.
    Jul 30 at 23:55














up vote
0
down vote

favorite












I've already installed AngularCLI with npm and then I try serving ng serve --open in the terminal. But the terminal shows an empty screen and then does nothing.
Screenshot of Terminal after serving app



What can I do to serve my Angular app?







share|improve this question






















  • Problem solved! It was because of npm permissions and It must be sudo npm
    – El.
    Jul 30 at 23:55












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I've already installed AngularCLI with npm and then I try serving ng serve --open in the terminal. But the terminal shows an empty screen and then does nothing.
Screenshot of Terminal after serving app



What can I do to serve my Angular app?







share|improve this question














I've already installed AngularCLI with npm and then I try serving ng serve --open in the terminal. But the terminal shows an empty screen and then does nothing.
Screenshot of Terminal after serving app



What can I do to serve my Angular app?









share|improve this question













share|improve this question




share|improve this question








edited Jul 30 at 22:47

























asked Apr 24 at 11:02









El.

13




13











  • Problem solved! It was because of npm permissions and It must be sudo npm
    – El.
    Jul 30 at 23:55
















  • Problem solved! It was because of npm permissions and It must be sudo npm
    – El.
    Jul 30 at 23:55















Problem solved! It was because of npm permissions and It must be sudo npm
– El.
Jul 30 at 23:55




Problem solved! It was because of npm permissions and It must be sudo npm
– El.
Jul 30 at 23:55










1 Answer
1






active

oldest

votes

















up vote
0
down vote













What you seem to have installed is the ng command from ng-common, which is an emacs-like command-line editor, not the Angular CLI.



Anyway, the Angular CLI is for Angular 2 or newer only, not for the old AngularJS. AngularJS is just a JavaScript library you include in your html, not the whole build framework Angular (2 or newer) provides.



You'd have to serve your project files with a regular web server.






share|improve this answer




















  • I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
    – El.
    Apr 26 at 8:32










  • If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
    – Byte Commander
    Apr 26 at 9:07










  • I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
    – El.
    Jul 30 at 22:53










  • You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
    – Byte Commander
    Jul 31 at 7:27










  • Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
    – El.
    Aug 1 at 1:10










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027763%2fangularcli-serving-problem-on-ubuntu-16-04%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













What you seem to have installed is the ng command from ng-common, which is an emacs-like command-line editor, not the Angular CLI.



Anyway, the Angular CLI is for Angular 2 or newer only, not for the old AngularJS. AngularJS is just a JavaScript library you include in your html, not the whole build framework Angular (2 or newer) provides.



You'd have to serve your project files with a regular web server.






share|improve this answer




















  • I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
    – El.
    Apr 26 at 8:32










  • If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
    – Byte Commander
    Apr 26 at 9:07










  • I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
    – El.
    Jul 30 at 22:53










  • You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
    – Byte Commander
    Jul 31 at 7:27










  • Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
    – El.
    Aug 1 at 1:10














up vote
0
down vote













What you seem to have installed is the ng command from ng-common, which is an emacs-like command-line editor, not the Angular CLI.



Anyway, the Angular CLI is for Angular 2 or newer only, not for the old AngularJS. AngularJS is just a JavaScript library you include in your html, not the whole build framework Angular (2 or newer) provides.



You'd have to serve your project files with a regular web server.






share|improve this answer




















  • I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
    – El.
    Apr 26 at 8:32










  • If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
    – Byte Commander
    Apr 26 at 9:07










  • I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
    – El.
    Jul 30 at 22:53










  • You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
    – Byte Commander
    Jul 31 at 7:27










  • Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
    – El.
    Aug 1 at 1:10












up vote
0
down vote










up vote
0
down vote









What you seem to have installed is the ng command from ng-common, which is an emacs-like command-line editor, not the Angular CLI.



Anyway, the Angular CLI is for Angular 2 or newer only, not for the old AngularJS. AngularJS is just a JavaScript library you include in your html, not the whole build framework Angular (2 or newer) provides.



You'd have to serve your project files with a regular web server.






share|improve this answer












What you seem to have installed is the ng command from ng-common, which is an emacs-like command-line editor, not the Angular CLI.



Anyway, the Angular CLI is for Angular 2 or newer only, not for the old AngularJS. AngularJS is just a JavaScript library you include in your html, not the whole build framework Angular (2 or newer) provides.



You'd have to serve your project files with a regular web server.







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 24 at 11:57









Byte Commander

59.2k26158267




59.2k26158267











  • I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
    – El.
    Apr 26 at 8:32










  • If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
    – Byte Commander
    Apr 26 at 9:07










  • I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
    – El.
    Jul 30 at 22:53










  • You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
    – Byte Commander
    Jul 31 at 7:27










  • Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
    – El.
    Aug 1 at 1:10
















  • I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
    – El.
    Apr 26 at 8:32










  • If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
    – Byte Commander
    Apr 26 at 9:07










  • I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
    – El.
    Jul 30 at 22:53










  • You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
    – Byte Commander
    Jul 31 at 7:27










  • Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
    – El.
    Aug 1 at 1:10















I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
– El.
Apr 26 at 8:32




I'd already installed Angular CLI with the instruction provided by their official website, what I'm taking about is the last step when i want to serve my-App
– El.
Apr 26 at 8:32












If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
– Byte Commander
Apr 26 at 9:07




If you use AngularJS ("Angular 1") and not Angular (2 or newer), you can not use the Angular CLI. And the screenshot you provided is not the Angular CLI's ng command, but what I said in my answer. There is no specific way to serve an AngularJS project, because it's just a simple web page with HTML, CSS and JavaScript, where no preprocessing, transpiling or bundling of the sources is required. You can either try opening the html file directly from the disk in your browser, but that might mess up URL paths, or you need to install any server application.
– Byte Commander
Apr 26 at 9:07












I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
– El.
Jul 30 at 22:53




I still have that old problem in ubuntu, I install angular 6 and also ng-common and issue is the same as it was before
– El.
Jul 30 at 22:53












You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
– Byte Commander
Jul 31 at 7:27




You shall not install the ng-common package. As I said in my answer, this is an editor, and completely unrelated to Angular. Remove it with sudo apt purge ng-common to avoid confusion. You must install the correct npm package with npm install -g @angular/cli, as described on cli.angular.io.
– Byte Commander
Jul 31 at 7:27












Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
– El.
Aug 1 at 1:10




Ok, it wasn't about ng or ng-common hopefully. it was because of npm install -g @angular/cli, it must be sudo npm install -g @angular/cli actually. thanks
– El.
Aug 1 at 1:10

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1027763%2fangularcli-serving-problem-on-ubuntu-16-04%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

pylint3 and pip3 broken

Missing snmpget and snmpwalk

How to enroll fingerprints to Ubuntu 17.10 with VFS491