[英]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编译器的方法:
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.