生成浏览器应用程序包时发生错误(阶段:设置)。什么可能导致此错误?
来自控制台的信息:
生成浏览器应用程序包(阶段:设置)... TypeError:无法读取 NodeObject.getText 处未定义的属性“文本”(/opt/app-root/src/node_modules/typescript/lib/typescript.js:152697:31)在 getRequiredModulePath (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/host/umd_host.js:519:99) 在 Object.getImportsOfUmdModule (/opt/app-root/src/node_modules) /@angular/compiler-cli/ngcc/src/host/umd_host.js:510:23) 在 UmdDependencyHost.extractImports (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependencies /umd_dependency_host.js:43:54) 在 UmdDependencyHost.DependencyHostBase.recursivelyCollectDependencies (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependency/dependency_host.js:85:32) 在 UmdDependencyHost .DependencyHostBase.collectDependency (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/dependencies/dependency_host.js:38:22) 在 DependencyResolver.getEntryPointWithDependencies (/opt/app-root/src) /node_modules/@angular/compiler-cli/ngcc/src/dependency/dependency_resolver.js:75:22) 在 EntryPointCollector.walkDirectoryForPackages (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src /entry_point_finder/entry_point_collector.js:47:52) 在 EntryPointCollector.walkDirectoryForPackages (/opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/entry_point_collector.js:75:103) 在 / opt/app-root/src/node_modules/@angular/compiler-cli/ngcc/src/entry_point_finder/program_based_entry_point_finder.js:124:100
来自 angle-errors.log 的信息
构建期间发生错误:错误:NGCC 失败。在 NgccProcessor.process (/opt/app-root/src/node_modules/@ngtools/webpack/src/ngcc_processor.js:139:19) 在 /opt/app-root/src/node_modules/@ngtools/webpack/src/ ivy/plugin.js:129:27 在 Hook.eval [作为调用] (eval at create (/opt/app-root/src/node_modules/tapable/lib/HookCodeFactory.js:19:10), :28:1 )在 Hook.CALL_DELEGATE [as _call] (/opt/app-root/src/node_modules/tapable/lib/Hook.js:14:14) 在 Compiler.newCompilation (/opt/app-root/src/node_modules/webpack) /lib/Compiler.js:1043:30) 在 /opt/app-root/src/node_modules/webpack/lib/Compiler.js:1088:29 在 Hook.eval [as callAsync] (eval at create (/opt/ app-root/src/node_modules/tapable/lib/HookCodeFactory.js:33:10), :22:1) 在 Hook.CALL_ASYNC_DELEGATE [as _callAsync] …
typescript tsc angular-compiler-cli angular angular-compiler