运行此命令之后:-离子型cordova构建android --aot
12:00:25离子-应用-脚本任务:“构建”12:00:25错误:角AoT构建失败。请参阅上面的错误:角AoT构建失败。参见C:\Users\Admin\Git\olm_android\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:237:55 at step (C:\Users\Admin\Git\olm_android\node_modules@ionic\app-scripts\dist\aot\aot-compiler.js:32:23) at O
我正在使用Angular2应用程序,使用commonjs for JiT以及手动配置aot (两个index.html文件、两个main.ts文件等)到angular4 cli模板(ng new appName)的旧方法。
在2/4之间,在cli周围似乎发生了很大变化。观看了一些youtube视频,用ng cli创建了一个新应用程序,我看到ng build和ng serve都支持--prod和--aot标志,但使用这两种不同的标志生成的webpacks大小不同。
两者有什么区别?
ng build --prod
和
ng build --aot
然后为了服务:
ng serve --prod
Error on fetch for node_modules/angular2-notifications/src/simple-notifications.module.js at file:///D:/GIP/IMAGE PILOT/gipfe/node_modules/angular2-notifications/src/simple-notifications.module.js Loading build/tmp/aot/src/app/app.module.ngfactory.js Loading build\boot-aot.js
我正在尝试使用AOT编译器来实现角应用程序。我跟踪了的文章。因此,我下载了安装程序进行文件更改,在编译项目时创建了tsconfig-aot.json,使用命令node_ -p /..bin/ngc tsconfig-aot.json,它引发错误。
TypeError: this.compiler.analyzeModulesAsync is not a function
at CodeGenerator.codegen (/media/arjun/D/Work/TeachingMaterial/anngularJS/angular_aot2/quickstart/node_modules/@a
启动ng build --aot将导致
ERROR in : Unexpected directive 'TooltipComponent in /project/src/app/components/tooltip/tooltip.component.ts' imported by the module 'AchievementComponentModule in /project/src/app/components/achievement/achievement.module.ts'. Please add a @NgModule annotation.
我使用角4连同Webpack和亚恩一起作为包管理器。使用JIT启动我的项目,并尝试使用ngtools/webpack迁移到AOT。在尝试使用以下方法构建项目时:
yarn build
我知道错误:
ERROR in window is not defined
我已经从项目中删除了所有的窗口引用,以确保在我的项目中不会发生错误。我的结论是,它发生在我正在加载的外部模块中。但是,由于错误消息似乎被破坏了,所以无法判断是哪一个。尝试以各种不同的方式包括它,然后主要是这些问题:,,但目前对我来说没有什么有用的。
我认为这个密码:
var globalWindow = {};
globalWindow.
我想为我的应用程序设置AOT编译器。
当我运行node_modules/.bin/ngc -p tsconfig-aot.json时,它会成功编译,不会出现错误。
但是,当我尝试运行ng serve时,它会给出以下错误:
试图找到引导代码,但是找不到。指定静态可分析引导代码或将entryModule传递给插件选项.
Error: Tried to find bootstrap code, but could not. Specify either statically analyzable bootstrap code or pass in an entryModule to the plug
在浏览了Docs页面上的AOT教程之后,我正在尝试编译角2 AOT,并得到以下错误
"node_modules/.bin/ngc" -p tsconfig-aot.json
TypeError: compiler.AnimationParser is not a constructor
at Function.CodeGenerator.create (C:\Projects\NeilKellyClient4\node_modules\@angular\compiler-cli\src\codegen.js:108:400)
at codegen (C:\Projects\N
在git回购中有一个包裹。
它能使它与aot兼容。但是在构建我的应用时
ionic build --prod命令,aot将失败,错误如下所示。
[18:02:48] ngc started ...
[18:02:57] typescript error
Unexpected value 'ScrollingHeaderModule in
xxx/node_modules/ionic-scrolling-header/scrolling-header.module.d.ts' imported by the
module
我已经创建了一个包含在我的项目中的服务的角库,并且我已经在项目中导入了这个库,并且没有任何问题地测试它。
但是,当我试图为我的角度项目建立一个AOT时,这个错误就会出现。
Error: Maximum call stack size exceeded, resolving symbol SimpleAuthService in C:/i.rabeea/workspaces/hero/fulfillment_angular/node_modules/zwp-modules/auth/index.d.ts, resolving symbol SimpleAuthService in C:/i.ra
我正在尝试将一个应用程序转换为AOT,该应用程序已经在使用已加载的延迟模块。我正在使用@ngtools/webpack工具包编译AOT代码,但是我陷入了一个错误,无法像看起来那样找到已加载的延迟模块的代码。
ERROR in ./src/ngfactory async
Module not found: Error: Can't resolve '/Library/WebServer/Documents/envato-teams/src/ngfactory/src/app/components/container/projects.ngfactory.ts' in
当我使用下面的CLI时,它显示错误。错误消息对我来说不清楚。
> ionic cordova run android --prod --device
错误:
typescript error
Type AnimatesDirective in
D:/Freelance-Work/Clients/ionic3/node_modules/css-animator/angular/animates.directive.d.ts
is part of the declarations of 2 modules: AppMo