打字稿构建失败(Typescript build failure)

编程入门 行业动态 更新时间:2024-10-18 01:37:16
打字稿构建失败(Typescript build failure)

我目前有两个带有typescript 1.1的项目,这些项目在visual studio 2013中打开,并安装了typescript 1.8。 VS要求升级我做了但现在我得到以下错误:未知的编译器选项'listemittedfiles'。 任何人都有相同的?

I'm currently having two projects with typescript 1.1 that are opened in visual studio 2013 with typescript 1.8 installed. VS asks to upgrade which I did but now I get the following error: Unknown compiler option 'listemittedfiles'. Anyone has had the same?

最满意答案

在项目中我们似乎有这条线路硬编码

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />

即使它升级到1.8,它仍然试图使用w / e安装在该文件夹中。 (这是一个非常古老的项目,需要维护...)

接下来,我删除了Path系统环境变量中的硬编码路径,以便tsc.exe现在指向NPM版本。

It seems inside the project we had this line hardcoded

<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\TypeScript\Microsoft.TypeScript.targets" />

That way even though it was upgraded to 1.8 it still tried to use w/e was installed in that folder. (This is a very old project that needs maintenance...)

Next to that I've removed the hardcoded path in the Path system environment variables so that tsc.exe now points to the NPM version.

更多推荐

typescript,VS,'listemittedfiles',visual,studio,电脑培训,计算机培训,IT培训"/&

本文发布于:2023-04-28 05:34:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1330329.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Typescript   build   failure

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!