【问题标题】:How to fix "cannot destructure property extends of undefined or null"如何修复“无法解构未定义或空的属性扩展”
【发布时间】:2019-07-05 11:12:58
【问题描述】:

我正在设置我的 nodeJS,启动 ts 服务后 gulp 命令确实崩溃了。我希望能够“吞咽”并运行“npm run compiler”

PS D:\tfsGit\NewWorldProjects\Coruscant\Internal.UI\www> gulp
[11:59:36] Using gulpfile D:\tfsGit\NewWorldProjects\Coruscant\Internal.UI\www\gulpfile.js
[11:59:36] Starting 'scss'...
[11:59:36] Finished 'scss' after 9.42 ms
[11:59:36] Starting 'jsDependency'...
[11:59:36] Finished 'jsDependency' after 2.2 ms
[11:59:36] Starting 'ts'...
[11:59:36] 'ts' errored after 176 μs
[11:59:36] TypeError: Cannot destructure property `extends` of 'undefined' or 'null'.

【问题讨论】:

  • 使用前需要检查null

标签: angular gulp


【解决方案1】:

感谢您回到我身边! 我们没有引入任何空值。事实上,我们有一个非常不同的情况:我们将 AngularJS 与 Angular 2+ 合并。我们曾经执行 gulp 操作,但是这种行为只在少数机器上,而在其他机器上工作。我们将以下内容与工作机器进行了比较(并将版本更改为 ): 1. NPM 版本 2.节点版本 3. 吞咽版 4.我们对比了package.json文件

但是它不起作用。

有趣的是,gulp 命令在我机器的另一个虚拟目录中运行良好,该目录托管在同一个 IIS 下?

【讨论】:

    猜你喜欢
    • 2019-07-15
    • 2020-01-24
    • 1970-01-01
    • 2018-09-30
    • 2021-03-21
    • 1970-01-01
    • 2020-01-21
    • 2020-05-28
    • 2018-04-30
    相关资源
    最近更新 更多