angular - 错误 :Initialization error (typescript). 无法读取未定义的属性 'getExecutingFilePath'

标签 angular typescript intellij-idea

我通过npm配置了一个新的Angular2类型的应用。
我可以通过 ng serve 从节点命令提示符运行它。
但是在 IntelliJ IDEA(2016.3.4) 中,我无法从控制台运行。它的显示错误:

Error:Initialization error (typescript). Cannot read property 'getExecutingFilePath' of undefined

enter image description here

最佳答案

请确保在设置 | 中设置Typescript 版本语言与框架 | TypeScriptBundled;由于中断的 API 更改,Typescript 2.6+ 不能与 IDEA 2016.x 一起使用

enter image description here

如果你喜欢使用最新的 TypeScript 版本,你必须将 IDEA 升级到 2018.x

关于angular - 错误 :Initialization error (typescript). 无法读取未定义的属性 'getExecutingFilePath',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50643174/

相关文章:

angular - 在 ngClass 的条件实现中使用变量

Angular Sidebar Treeview 没有响应

javascript - API 对 Angular2 模型的响应

html - 将 html 类型 ="date"与 typescript new Date() 对象进行比较

javascript - typescript 错误: "Element implicitly has an ' any' type because expression of type 'any' can't be used to index type

typescript - 在 Typescript 中扩展全局声明的类型

jquery-ui - 在 TypeScript 中定义自定义 jQuery UI 小部件

java - 如何在 IntelliJ IDEA 中禁用 pom.xml 验证

java - IntelliJ 错误 :Abnormal build process termination

使用本地主机寻址时 JavaScript 库不起作用