TypeScript installed, but not being recognized by VS Code or Windows
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:
- 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). - Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the
tsc
compiler. I found none. - Ran the command
npm list -g
to ensure that TypeScript installed (it did.) - As a sanity check, ran the command from the path found in Step 3, resembling
C:UsersMyUserNameAppDataRoamingnpmtsc
- the path ran - 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. - Ran the command
setx path "%paths%:C:MyUserNameAppDataRoamingnpm"
to try to add the npm global directory to the system environmentpaths
variable. Upon running the command, closed the command line, opened a new one, and tried an unqualifiedtsc
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
add a comment |
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:
- 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). - Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the
tsc
compiler. I found none. - Ran the command
npm list -g
to ensure that TypeScript installed (it did.) - As a sanity check, ran the command from the path found in Step 3, resembling
C:UsersMyUserNameAppDataRoamingnpmtsc
- the path ran - 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. - Ran the command
setx path "%paths%:C:MyUserNameAppDataRoamingnpm"
to try to add the npm global directory to the system environmentpaths
variable. Upon running the command, closed the command line, opened a new one, and tried an unqualifiedtsc
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
add a comment |
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:
- 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). - Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the
tsc
compiler. I found none. - Ran the command
npm list -g
to ensure that TypeScript installed (it did.) - As a sanity check, ran the command from the path found in Step 3, resembling
C:UsersMyUserNameAppDataRoamingnpmtsc
- the path ran - 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. - Ran the command
setx path "%paths%:C:MyUserNameAppDataRoamingnpm"
to try to add the npm global directory to the system environmentpaths
variable. Upon running the command, closed the command line, opened a new one, and tried an unqualifiedtsc
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
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:
- 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). - Checked my envrionmental variables to ensure I wasn't pointing to any unusual locations for the
tsc
compiler. I found none. - Ran the command
npm list -g
to ensure that TypeScript installed (it did.) - As a sanity check, ran the command from the path found in Step 3, resembling
C:UsersMyUserNameAppDataRoamingnpmtsc
- the path ran - 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. - Ran the command
setx path "%paths%:C:MyUserNameAppDataRoamingnpm"
to try to add the npm global directory to the system environmentpaths
variable. Upon running the command, closed the command line, opened a new one, and tried an unqualifiedtsc
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
typescript npm visual-studio-code install
edited Nov 19 '18 at 19:37
Andrew Gray
asked Nov 19 '18 at 19:26


Andrew GrayAndrew Gray
2,10722552
2,10722552
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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!
add a comment |
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
});
}
});
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%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
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!
add a comment |
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!
add a comment |
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!
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!
answered Nov 19 '18 at 19:39


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