JirkaDellOro / Prima

Repository for the module "Prototyping interactive media-applications and games" at Furtwangen University
https://jirkadelloro.github.io/Prima
10 stars 17 forks source link

Issues setting up typescript!!! #20

Closed Rowan5654 closed 4 years ago

Rowan5654 commented 4 years ago

Hello.

I am sure this is probably common knowledge to everyone by now but I have been at this problem all morning and I'm finally ready to ask for help.

I am trying to run any typescript file but whenever I enter the command into the terminal:

"tsc filename.ts"

I just 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

I have tried running the "npm install -g typescript" command because I thought that I needed to install typescript even though it should have come with vscode but I just get the same error.

Anyone see my problem here? I'm very new to vscode as I usually use vsstudio and notepad++ so perhaps I've done something wrong here during installation?

Thanks.

JirkaDellOro commented 4 years ago

"npm install -g typescript"

That should do it, right. Restarted computer?

Rowan5654 commented 4 years ago

When I type that in I get the same message as before.

Perhaps I have set up visual studio code incorrectly? Is there any external software I need to download I don't know about?

image

JirkaDellOro commented 4 years ago

Ah... your system doesn't even know npm, so installing typescript didn't work in the first place. Of course, then you can't call tsc... So install Node.js, which usually comes with VSCode

JirkaDellOro commented 4 years ago

Please leave a final comment with some explanation to the solution you found, so that we all can learn from it.

Rowan5654 commented 4 years ago

I'm not really sure what I did to get it working. I just turned my computer off and went to bed. When I woke up this morning it miraculously worked!

Perhaps my solution was to restart my computer? Maybe.

JirkaDellOro commented 4 years ago

Maybe it just needed some sleep