(I work with Webstorm)
I am absolutely new at Angular so forgive me my ignorance. I started with a Udemy Angular course and I am at a part where they are talking about Typescript compiler, more specifically the tsc
command. Well, I followed the instructions: I installed Typescript globally using the npm install -g typescript
command.
C:\Users\Tijl Declerck\Desktop\projects\AngularTestApp>npm install -g typescript
C:\Users\Tijl Declerck\AppData\Roaming\npm\tsserver -> C:\Users\Tijl Declerck\AppData\Roaming\npm\node_modules\typescript\bin\tsserver
C:\Users\Tijl Declerck\AppData\Roaming\npm\tsc -> C:\Users\Tijl Declerck\AppData\Roaming\npm\node_modules\typescript\bin\tsc
+ typescript@2.6.1
updated 1 package in 123.052s
Then they asked me to create a folder ts-hello
inside the Angular app and give it a file main.ts
:
Main.ts
function log(message){
console.log(message)
}
var message = "hello world";
log(message);
Ok, so now they wish me to transpile the TS file using tsc main.ts
so that the folder ends up with two files main.js
& main.ts
. I however get this error message:
C:\Users\Tijl Declerck\Desktop\projects\AngularTestApp\ts-hello>tsc main.ts
"tsc" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
'tsc is not recognized as an internal or external command, program or executable batch file'(more or less the correct translation, I don't know why my console is all of a sudden in Spanish :D)
I have absolutely no idea what to do at this point. I've seen similar questions and I've tried some of their solutions like trying to reset the command line or redo the installation of Typescript, but those didn't seem to work. Other replies were just way too technical so I had absolutely no clue what they meant.
Could someone help me figure out what might be wrong and explain to me in an understandable way (It's my very first day in Angular).