【问题标题】:Why is my build breaking on the ng2-toasty module dependence?为什么我的构建会破坏 ng2-toasty 模块的依赖?
【发布时间】:2021-08-05 04:52:38
【问题描述】:

我的项目依赖于ng2-toasty,当我尝试构建时,出现以下错误:

构建期间发生错误:错误:目标入口点 “ng2-toasty”缺少依赖项:

  • rxjs/可观察

    在 TargetedEntryPointFinder.findEntryPoints (tst/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/targeted_entry_point_finder.js:40:23) 在 tst/node_modules/@angular/compiler-cli/ngcc/src/execution/analyze_entry_points.js:29:41 在 SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (tst/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:28:29) 在 tst/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:59 在 SyncLocker.lock (tst/node_modules/@angular/compiler-cli/ngcc/src/locking/sync_locker.js:34:24) 在 SingleProcessExecutorSync.execute (tst/node_modules/@angular/compiler-cli/ngcc/src/execution/single_process_executor.js:57:27) 在 Object.mainNgcc (tst/node_modules/@angular/compiler-cli/ngcc/src/main.js:74:25) 在 Object.process (tst/node_modules/@angular/compiler-cli/ngcc/index.js:29:23) 在 NgccProcessor.processModule (tst/node_modules/@ngtools/webpack/src/ngcc_processor.js:175:16) 在 tst/node_modules/@ngtools/webpack/src/ivy/host.js:146:18 在 tst/node_modules/@ngtools/webpack/src/ivy/host.js:76:24 在 Array.map() 在 Object.host.resolveModuleNames (tst/node_modules/@ngtools/webpack/src/ivy/host.js:74:32) 在实际ResolveModuleNamesWorker (tst/node_modules/typescript/lib/typescript.js:109497:133) 在 resolveModuleNamesWorker (tst/node_modules/typescript/lib/typescript.js:109760:26) 在 resolveModuleNamesReusingOldState (tst/node_modules/typescript/lib/typescript.js:109857:24) 一个未处理的 发生异常:目标入口点“ng2-toasty”丢失 依赖:

  • rxjs/可观察

这是我的 package.json 依赖子句中的相关条目:

package.json:    "ng2-toasty": "^4.0.3",

我不是一个有棱角的人...谁能提出问题可能是什么?我在网上几乎找不到关于这个模块的任何信息,除了 Git 存储库

【问题讨论】:

  • ng2-toasty,4 年前最后一次更新。您是否考虑过为 toasts 使用另一个依赖项?另一种方法是创建项目的一个分支,我不建议这样做,因为你不是一个有角度的人
  • 谢谢大家。 @ChrisW,您可以将其发布为答案,我会批准它
  • 完成,删除原始评论。虽然可能应该把它作为一个副本,尽管其他人没有直接引用ng2-toasty

标签: angular


【解决方案1】:

它使用deprecated rxjs dependencies 并且需要rxjs-compat 以实现向后兼容性,具体取决于您的版本....但是就像@CristianTraìna 指出的那样,强烈建议尝试使用受支持的替代方案并放弃烤面包并保持前向版本控制的习惯在使用过的组件中。

【讨论】:

    猜你喜欢
    • 2020-03-26
    • 1970-01-01
    • 1970-01-01
    • 2021-08-05
    • 1970-01-01
    • 1970-01-01
    • 2018-02-21
    • 2013-06-25
    • 2013-06-07
    相关资源
    最近更新 更多