简体   繁体   English

如何修复IntelliJ IDEA 2016 TypeScript错误,“无法启动编译器进程”

[英]How to fix IntelliJ IDEA 2016 TypeScript Error, “Cannot start compiler process”

After setting up IntelliJ IDEA 2016.2.x with a TypeScript compiler, in my case Node v6.2.1, I get a TypeScript Project Error as follows: 在使用TypeScript编译器设置IntelliJ IDEA 2016.2.x后,在我的案例中使用Node v6.2.1,我得到一个TypeScript项目错误,如下所示:

"Error: Cannot start compiler process" “错误:无法启动编译器进程”

This started happening after IntelliJ was upgraded to 2016.2.x. 在IntelliJ升级到2016.2.x之后,这种情况开始发生。 Previous versions worked fine. 以前的版本工作正常。

Here's how I setup the TypeScript compiler: 以下是我设置TypeScript编译器的方法: 在此输入图像描述

Here's the error message: 这是错误消息: 在此输入图像描述

To fix this problem, directly edit the TypeScript configuration within the project's .idea directory. 要解决此问题,请直接编辑项目的.idea目录中的TypeScript配置。 Within the project structure, navigate to your .idea directory then locate and open file typescript-compiler.xml like below. 在项目结构中,导航到.idea目录,然后找到并打开文件typescript-compiler.xml,如下所示。 直接编辑

Now add the following xml option element after the "useConfig" option element (make sure to use the path appropriate your node installation): 现在在“useConfig”选项元素之后添加以下xml选项元素(确保使用适合您的节点安装的路径):

<option name="nodeInterpreterTextField" value="$PROJECT_DIR$/../../node/bin/node" />

Be sure to change the directory path to your instance of node. 请务必更改节点实例的目录路径。
固定

Sadly, this solution we be overridden every time you edit and save your settings. 遗憾的是,每次编辑和保存设置时,我们都会覆盖此解决方案。 Hopefully, IDEA will have a fix for this soon. 希望IDEA很快能解决这个问题。

First, I ran: 首先,我跑了:
npm install gulp-typescript typescript --save-dev npm install gulp-typescript typescript --save-dev

Then, I downloaded 2017.1.4 version of WebStorm and reinstalled WebStorm. 然后,我下载了2017.1.4版本的WebStorm并重新安装了WebStorm。

Everything works fine after that. 之后一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何解决错误:运行idea.sh时无法在arch上启动IntelliJ IDEA? - how solve ERROR: Cannot start IntelliJ IDEA on arch while run idea.sh? 如何在IntelliJ IDEA中为TypeScript修复Mocha全局符号? - How to fix Mocha global symbols for TypeScript in IntelliJ IDEA? IntelliJ Idea + AEM 插件 + TypeScript 编译器问题 - IntelliJ Idea + AEM Plugin + TypeScript compiler issue IntelliJ IDEA:构建过程异常终止 - 如何修复? - IntelliJ IDEA: Abnormal build process termination - how to fix? Intellij IDEA:如何修复异常的构建过程终止? - Intellij IDEA: How to fix Abnormal build process termination? 如何修复错误加载项目:无法在 Intellij IDEA 中加载 facet Spring? - How can I fix Error Loading Project: Cannot load facet Spring in Intellij IDEA? INTELLIJ IDEA 错误:“无法启动 Git:/usr/bin/git 可能 Git 可执行文件的路径无效。修复它。” 如何修复? - INTELLIJ IDEA ERROR: "Can't start Git: /usr/bin/git Probably the path to Git executable is not valid. Fix it." How to Fix it? 如何解决 Intellij Idea 的“无法启动 Scala 编译服务器”? - How to solve 'Cannot start Scala compile server' for Intellij Idea? 如何修复损坏的 Intellij Idea? - How to fix a broken Intellij Idea? IntelliJ Idea 找不到 sbt-idea-compiler-indices - IntelliJ Idea Cannot find sbt-idea-compiler-indices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM