2017-10-06 1 views
-1

J'ai des problèmes pour exécuter un fichier de type. J'utilise du code studio visuel pour exécuter des fichiers de type. J'ai installé et mis en place un code studio visuel et un tapuscrit. Mais quand j'essaye d'exécuter le fichier de tapuscrit (tsc filename.ts) il montre une erreur. S'il vous plaît aider!Exécution de fichiers typographiques à l'aide du code Visual Studio

Erreur:

PS D:\01_Hello> tsc app.ts 
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 app.ts 
+ ~~~ 
    + CategoryInfo   : ObjectNotFound: (tsc:String) [], CommandNotFoundException 
    + FullyQualifiedErrorId : CommandNotFoundException 
+0

La duplication possible de [tsc n'est pas reconnue comme commande interne ou externe] (https://stackoverflow.com/questions/35369501/tsc-is-not-recognized-as-internal-or-external-command) –

Répondre

0

code Visual Studio est conçu pour fonctionner avec la version dactylographiée que vous avez attrapé par NPM. Voici donc les étapes que vous devez faire ...

  1. Noeud
  2. Installez
  3. Run npm install -g typescript
  4. Check it a travaillé avec tsc -v

Vous devriez maintenant tout fonctionne.