这个问题在这里已经有了答案:
从Windows命令行运行tsc 1答案我是Typescript的初学者。 首先我创建了“types.ts”,并在index.html文件中引用。 我已经在Visual Studio代码终端窗口中使用npm install -g typescript在全球范围内npm install -g typescript 。
安装后,当我尝试使用tsc -v ,它给了我错误
'tsc' is not recognized as an internal or external command,operable program or batch file.我搜索并尝试了不同的选项。 我将以下路径添加为环境变量。
C:\用户\\应用程序数据\漫游\故宫\ tsc.cmd
然后我重新启动机器,但它仍然给我同样的错误。
This question already has an answer here:
Running tsc from the Windows command line 2 answersI am a beginner to Typescript. To begin with I have created "types.ts" and referred in index.html file. And I have installed typescript globally using npm install -g typescript in Visual studio Code terminal window.
After installation when I tried to use tsc -v , It gives me the error
'tsc' is not recognized as an internal or external command,operable program or batch file.I searched and tried different options. I was adding following path as a environment variable.
C:\Users\\AppData\Roaming\npm\tsc.cmd
Then I restarted the machine still it gives me the same error.
最满意答案
最后我找到了我自己的答案。 你可以看下面的URL来了解配置的初始步骤。
打字稿配置
但是我得到的错误是通过向我的环境变量部分添加%APPDATA%\npm来解决的。
Finally I found the answer my self. You can watch the below URL to understand the initial steps of configuration.
Typescript Configuration
But the Error which i got is resolved by adding %APPDATA%\npm to my environment variable section.
更多推荐
发布评论