When uninstalling Angular CLI (@angluar/cli) the angular version is still 6.2.0











up vote
0
down vote

favorite












I'm trying to update my angular-cli version to the latest, and for that I'm doing:



npm uninstall -g @angular/cli
npm cache verify


After that, I closed and opened again the terminal and typed in an empty folder:



ng -v 


and the output was: 6.2.0



I also tried to install the latest version of angular with:



npm install -g @angular/cli@latest


and then executing



ng new my-app


but the next error showed:



npm ERR! path /home/<path>/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/raul/<path>/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/<my_name>/.npm/_logs/2018-11-09T23_58_11_085Z-debug.log


And inside that log I have:



0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ng',
1 verbose cli 'new',
1 verbose cli 'my-app' ]
2 info using npm@6.2.0
3 info using node@v10.13.0
4 verbose stack Error: ENOENT: no such file or directory, open '/home/<path>r/package.json'
5 verbose cwd /home/<path>
6 verbose Linux 4.15.0-38-generic
7 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "ng" "new" "my-app"
8 verbose node v10.13.0
9 verbose npm v6.2.0
10 error path /home/<path>/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/home<path>/package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]


I also tried doing "ng serve" on an existing project and it worked fine.



Can I get some help?



Thanks.










share|improve this question






















  • Try npm install -g @angular/cli@latest
    – PeS
    Nov 10 at 0:36















up vote
0
down vote

favorite












I'm trying to update my angular-cli version to the latest, and for that I'm doing:



npm uninstall -g @angular/cli
npm cache verify


After that, I closed and opened again the terminal and typed in an empty folder:



ng -v 


and the output was: 6.2.0



I also tried to install the latest version of angular with:



npm install -g @angular/cli@latest


and then executing



ng new my-app


but the next error showed:



npm ERR! path /home/<path>/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/raul/<path>/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/<my_name>/.npm/_logs/2018-11-09T23_58_11_085Z-debug.log


And inside that log I have:



0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ng',
1 verbose cli 'new',
1 verbose cli 'my-app' ]
2 info using npm@6.2.0
3 info using node@v10.13.0
4 verbose stack Error: ENOENT: no such file or directory, open '/home/<path>r/package.json'
5 verbose cwd /home/<path>
6 verbose Linux 4.15.0-38-generic
7 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "ng" "new" "my-app"
8 verbose node v10.13.0
9 verbose npm v6.2.0
10 error path /home/<path>/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/home<path>/package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]


I also tried doing "ng serve" on an existing project and it worked fine.



Can I get some help?



Thanks.










share|improve this question






















  • Try npm install -g @angular/cli@latest
    – PeS
    Nov 10 at 0:36













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I'm trying to update my angular-cli version to the latest, and for that I'm doing:



npm uninstall -g @angular/cli
npm cache verify


After that, I closed and opened again the terminal and typed in an empty folder:



ng -v 


and the output was: 6.2.0



I also tried to install the latest version of angular with:



npm install -g @angular/cli@latest


and then executing



ng new my-app


but the next error showed:



npm ERR! path /home/<path>/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/raul/<path>/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/<my_name>/.npm/_logs/2018-11-09T23_58_11_085Z-debug.log


And inside that log I have:



0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ng',
1 verbose cli 'new',
1 verbose cli 'my-app' ]
2 info using npm@6.2.0
3 info using node@v10.13.0
4 verbose stack Error: ENOENT: no such file or directory, open '/home/<path>r/package.json'
5 verbose cwd /home/<path>
6 verbose Linux 4.15.0-38-generic
7 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "ng" "new" "my-app"
8 verbose node v10.13.0
9 verbose npm v6.2.0
10 error path /home/<path>/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/home<path>/package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]


I also tried doing "ng serve" on an existing project and it worked fine.



Can I get some help?



Thanks.










share|improve this question













I'm trying to update my angular-cli version to the latest, and for that I'm doing:



npm uninstall -g @angular/cli
npm cache verify


After that, I closed and opened again the terminal and typed in an empty folder:



ng -v 


and the output was: 6.2.0



I also tried to install the latest version of angular with:



npm install -g @angular/cli@latest


and then executing



ng new my-app


but the next error showed:



npm ERR! path /home/<path>/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/home/raul/<path>/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/<my_name>/.npm/_logs/2018-11-09T23_58_11_085Z-debug.log


And inside that log I have:



0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'run',
1 verbose cli 'ng',
1 verbose cli 'new',
1 verbose cli 'my-app' ]
2 info using npm@6.2.0
3 info using node@v10.13.0
4 verbose stack Error: ENOENT: no such file or directory, open '/home/<path>r/package.json'
5 verbose cwd /home/<path>
6 verbose Linux 4.15.0-38-generic
7 verbose argv "/usr/bin/node" "/usr/local/bin/npm" "run" "ng" "new" "my-app"
8 verbose node v10.13.0
9 verbose npm v6.2.0
10 error path /home/<path>/package.json
11 error code ENOENT
12 error errno -2
13 error syscall open
14 error enoent ENOENT: no such file or directory, open '/home<path>/package.json'
15 error enoent This is related to npm not being able to find a file.
16 verbose exit [ -2, true ]


I also tried doing "ng serve" on an existing project and it worked fine.



Can I get some help?



Thanks.







angular angular-cli angular-cli-v6 angular-cli-v7






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 0:07









FlowYourMind

63




63












  • Try npm install -g @angular/cli@latest
    – PeS
    Nov 10 at 0:36


















  • Try npm install -g @angular/cli@latest
    – PeS
    Nov 10 at 0:36
















Try npm install -g @angular/cli@latest
– PeS
Nov 10 at 0:36




Try npm install -g @angular/cli@latest
– PeS
Nov 10 at 0:36












2 Answers
2






active

oldest

votes

















up vote
0
down vote













try the code below in new empty dir.



npm uninstall -g @angular/cli
npm uninstall --save-dev @angular/cli
npm cache verify
npm install -g @angular/cli
ng v





share|improve this answer










New contributor




m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


















  • I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
    – FlowYourMind
    2 days ago










  • Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
    – FlowYourMind
    2 days ago


















up vote
0
down vote













Ok, it was my bad, in my .bashrc i redirected "ng" to "npm use ng".



Sorry and thank you all






share|improve this answer





















    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',
    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%2f53234849%2fwhen-uninstalling-angular-cli-angluar-cli-the-angular-version-is-still-6-2-0%23new-answer', 'question_page');
    }
    );

    Post as a guest
































    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    try the code below in new empty dir.



    npm uninstall -g @angular/cli
    npm uninstall --save-dev @angular/cli
    npm cache verify
    npm install -g @angular/cli
    ng v





    share|improve this answer










    New contributor




    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.


















    • I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
      – FlowYourMind
      2 days ago










    • Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
      – FlowYourMind
      2 days ago















    up vote
    0
    down vote













    try the code below in new empty dir.



    npm uninstall -g @angular/cli
    npm uninstall --save-dev @angular/cli
    npm cache verify
    npm install -g @angular/cli
    ng v





    share|improve this answer










    New contributor




    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.


















    • I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
      – FlowYourMind
      2 days ago










    • Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
      – FlowYourMind
      2 days ago













    up vote
    0
    down vote










    up vote
    0
    down vote









    try the code below in new empty dir.



    npm uninstall -g @angular/cli
    npm uninstall --save-dev @angular/cli
    npm cache verify
    npm install -g @angular/cli
    ng v





    share|improve this answer










    New contributor




    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    try the code below in new empty dir.



    npm uninstall -g @angular/cli
    npm uninstall --save-dev @angular/cli
    npm cache verify
    npm install -g @angular/cli
    ng v






    share|improve this answer










    New contributor




    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    share|improve this answer



    share|improve this answer








    edited Nov 10 at 1:08





















    New contributor




    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    answered Nov 10 at 0:36









    m7md2112

    13




    13




    New contributor




    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    New contributor





    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    m7md2112 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.












    • I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
      – FlowYourMind
      2 days ago










    • Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
      – FlowYourMind
      2 days ago


















    • I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
      – FlowYourMind
      2 days ago










    • Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
      – FlowYourMind
      2 days ago
















    I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
    – FlowYourMind
    2 days ago




    I tried and just after "npm cache verify" i tried "ng -v" and the output was still "6.2.0" After all these instructions, the output for "ng -v" is still 6.2.0
    – FlowYourMind
    2 days ago












    Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
    – FlowYourMind
    2 days ago




    Also, i just realized that "ng -v" is outputing my npm version, so i guess at some point I redirected the command "ng" to "npm"
    – FlowYourMind
    2 days ago












    up vote
    0
    down vote













    Ok, it was my bad, in my .bashrc i redirected "ng" to "npm use ng".



    Sorry and thank you all






    share|improve this answer

























      up vote
      0
      down vote













      Ok, it was my bad, in my .bashrc i redirected "ng" to "npm use ng".



      Sorry and thank you all






      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Ok, it was my bad, in my .bashrc i redirected "ng" to "npm use ng".



        Sorry and thank you all






        share|improve this answer












        Ok, it was my bad, in my .bashrc i redirected "ng" to "npm use ng".



        Sorry and thank you all







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 2 days ago









        FlowYourMind

        63




        63






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53234849%2fwhen-uninstalling-angular-cli-angluar-cli-the-angular-version-is-still-6-2-0%23new-answer', 'question_page');
            }
            );

            Post as a guest




















































































            Popular posts from this blog

            Xamarin.iOS Cant Deploy on Iphone

            Glorious Revolution

            Dulmage-Mendelsohn matrix decomposition in Python