TypeScript installed, but not being recognized by VS Code or Windows












0














I've recently been working on a small project in VS Code that is primarily typescript.



I committed it to a GitHub repository and downloaded it onto a machine that I regularly use for TypeScript development. However, when I try to build my VS Code project, I get the error:



tsc : The term 'tsc' is not recognized as the name of a cmdlet, function, 
script file, or operable program. Check the spelling of the name, or if a
path was included, verify
that the path is correct and try again.
At line:1 char:1
+ tsc
+ ~~~
+ CategoryInfo : ObjectNotFound: (tsc:String) , CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException


After reading other StackOverflow questions on the subject, I tried a few things:




  1. Installed typescript using npm, with the command npm install -g typescript - I received no error messages, so it seems the install was successful (confirmed in Step 3).

  2. Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the tsc compiler. I found none.

  3. Ran the command npm list -g to ensure that TypeScript installed (it did.)

  4. As a sanity check, ran the command from the path found in Step 3, resembling C:UsersMyUserNameAppDataRoamingnpmtsc - the path ran

  5. With the sanity check's results in mind, opened a clean command prompt, and tried running tsc -v - command was not recognized by the OS.

  6. Ran the command setx path "%paths%:C:MyUserNameAppDataRoamingnpm" to try to add the npm global directory to the system environment paths variable. Upon running the command, closed the command line, opened a new one, and tried an unqualified tsc command. No luck.


It's almost as if the npm install -g typescript command isn't enough to actually install TypeScript such that the system recognizes it on a global basis (despite using the -g/"global" flag). Clearly I'm missing something. What is it that I'm missing?










share|improve this question





























    0














    I've recently been working on a small project in VS Code that is primarily typescript.



    I committed it to a GitHub repository and downloaded it onto a machine that I regularly use for TypeScript development. However, when I try to build my VS Code project, I get the error:



    tsc : The term 'tsc' is not recognized as the name of a cmdlet, function, 
    script file, or operable program. Check the spelling of the name, or if a
    path was included, verify
    that the path is correct and try again.
    At line:1 char:1
    + tsc
    + ~~~
    + CategoryInfo : ObjectNotFound: (tsc:String) , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException


    After reading other StackOverflow questions on the subject, I tried a few things:




    1. Installed typescript using npm, with the command npm install -g typescript - I received no error messages, so it seems the install was successful (confirmed in Step 3).

    2. Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the tsc compiler. I found none.

    3. Ran the command npm list -g to ensure that TypeScript installed (it did.)

    4. As a sanity check, ran the command from the path found in Step 3, resembling C:UsersMyUserNameAppDataRoamingnpmtsc - the path ran

    5. With the sanity check's results in mind, opened a clean command prompt, and tried running tsc -v - command was not recognized by the OS.

    6. Ran the command setx path "%paths%:C:MyUserNameAppDataRoamingnpm" to try to add the npm global directory to the system environment paths variable. Upon running the command, closed the command line, opened a new one, and tried an unqualified tsc command. No luck.


    It's almost as if the npm install -g typescript command isn't enough to actually install TypeScript such that the system recognizes it on a global basis (despite using the -g/"global" flag). Clearly I'm missing something. What is it that I'm missing?










    share|improve this question



























      0












      0








      0







      I've recently been working on a small project in VS Code that is primarily typescript.



      I committed it to a GitHub repository and downloaded it onto a machine that I regularly use for TypeScript development. However, when I try to build my VS Code project, I get the error:



      tsc : The term 'tsc' is not recognized as the name of a cmdlet, function, 
      script file, or operable program. Check the spelling of the name, or if a
      path was included, verify
      that the path is correct and try again.
      At line:1 char:1
      + tsc
      + ~~~
      + CategoryInfo : ObjectNotFound: (tsc:String) , CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException


      After reading other StackOverflow questions on the subject, I tried a few things:




      1. Installed typescript using npm, with the command npm install -g typescript - I received no error messages, so it seems the install was successful (confirmed in Step 3).

      2. Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the tsc compiler. I found none.

      3. Ran the command npm list -g to ensure that TypeScript installed (it did.)

      4. As a sanity check, ran the command from the path found in Step 3, resembling C:UsersMyUserNameAppDataRoamingnpmtsc - the path ran

      5. With the sanity check's results in mind, opened a clean command prompt, and tried running tsc -v - command was not recognized by the OS.

      6. Ran the command setx path "%paths%:C:MyUserNameAppDataRoamingnpm" to try to add the npm global directory to the system environment paths variable. Upon running the command, closed the command line, opened a new one, and tried an unqualified tsc command. No luck.


      It's almost as if the npm install -g typescript command isn't enough to actually install TypeScript such that the system recognizes it on a global basis (despite using the -g/"global" flag). Clearly I'm missing something. What is it that I'm missing?










      share|improve this question















      I've recently been working on a small project in VS Code that is primarily typescript.



      I committed it to a GitHub repository and downloaded it onto a machine that I regularly use for TypeScript development. However, when I try to build my VS Code project, I get the error:



      tsc : The term 'tsc' is not recognized as the name of a cmdlet, function, 
      script file, or operable program. Check the spelling of the name, or if a
      path was included, verify
      that the path is correct and try again.
      At line:1 char:1
      + tsc
      + ~~~
      + CategoryInfo : ObjectNotFound: (tsc:String) , CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException


      After reading other StackOverflow questions on the subject, I tried a few things:




      1. Installed typescript using npm, with the command npm install -g typescript - I received no error messages, so it seems the install was successful (confirmed in Step 3).

      2. Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the tsc compiler. I found none.

      3. Ran the command npm list -g to ensure that TypeScript installed (it did.)

      4. As a sanity check, ran the command from the path found in Step 3, resembling C:UsersMyUserNameAppDataRoamingnpmtsc - the path ran

      5. With the sanity check's results in mind, opened a clean command prompt, and tried running tsc -v - command was not recognized by the OS.

      6. Ran the command setx path "%paths%:C:MyUserNameAppDataRoamingnpm" to try to add the npm global directory to the system environment paths variable. Upon running the command, closed the command line, opened a new one, and tried an unqualified tsc command. No luck.


      It's almost as if the npm install -g typescript command isn't enough to actually install TypeScript such that the system recognizes it on a global basis (despite using the -g/"global" flag). Clearly I'm missing something. What is it that I'm missing?







      typescript npm visual-studio-code install






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 '18 at 19:37







      Andrew Gray

















      asked Nov 19 '18 at 19:26









      Andrew GrayAndrew Gray

      2,10722552




      2,10722552
























          1 Answer
          1






          active

          oldest

          votes


















          0














          After updating node.js to 10.13.0 LTS, after closing and re-opening both my command prompt and VS Code, tsc runs.



          So, be sure you update node if you start getting funny feedback from tsc!






          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',
            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%2f53381355%2ftypescript-installed-but-not-being-recognized-by-vs-code-or-windows%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














            After updating node.js to 10.13.0 LTS, after closing and re-opening both my command prompt and VS Code, tsc runs.



            So, be sure you update node if you start getting funny feedback from tsc!






            share|improve this answer


























              0














              After updating node.js to 10.13.0 LTS, after closing and re-opening both my command prompt and VS Code, tsc runs.



              So, be sure you update node if you start getting funny feedback from tsc!






              share|improve this answer
























                0












                0








                0






                After updating node.js to 10.13.0 LTS, after closing and re-opening both my command prompt and VS Code, tsc runs.



                So, be sure you update node if you start getting funny feedback from tsc!






                share|improve this answer












                After updating node.js to 10.13.0 LTS, after closing and re-opening both my command prompt and VS Code, tsc runs.



                So, be sure you update node if you start getting funny feedback from tsc!







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 19 '18 at 19:39









                Andrew GrayAndrew Gray

                2,10722552




                2,10722552






























                    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.





                    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.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53381355%2ftypescript-installed-but-not-being-recognized-by-vs-code-or-windows%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

                    MongoDB - Not Authorized To Execute Command

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

                    How to fix TextFormField cause rebuild widget in Flutter