我尝试用角CLI ng build --prod构建项目,并得到了以下错误:
TypeError中的错误:无法读取未定义的属性“类别”
如果我使用非--prod 构建,则不会得到任何错误。
完全错误:
ERROR in TypeError: Cannot read property 'kind' of undefined
at isParameterPropertyDeclaration (node_modules/typescript/lib/typescript.js:13445:88)
at Object.filter (node_modules/
通过遵循update.angular.io迁移指南,我正在尝试将我的项目更新为角9。在执行ng update @angular/core @angular/cli之后,在执行ng build --prod时,我会得到一个错误:"ERROR in不能读取未定义的属性'length‘“,而ng build仍然在工作。ng build --aot也在工作。
npm日志提供以下输出
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm
你好,我在使用Angular CLI快2年的时候遇到了这个错误。我用谷歌搜索了一下,我找不到任何解决这个问题的方法。
Can't resolve all parameters for BaseService in E:/**/web/src/app/shared/services/base.service.ts: ([object Object], ?, ?, ?). This will become an error in Angular v6.x
当我运行此命令时
ng build --output-hashing none --prod --build-optimizer=
我的filterProducts函数调用findIntersection,但我得到了一个错误,findIntersection是未定义的。
angular.module('BrandService', [])
.service('BrandService', function ($filter, DataService) {
var productDb;
var products;
return {
filterProducts(brands, priceRange) {
var filtered
我有一个使用Angluar创建的虚拟多项目Angular工作区,就像这里所述的https://angular.io/guide/creating-libraries,就在我的工作区中,我有库和应用程序,这意味着我执行了以下命令: ng new my-workspace --create-application=false
cd my-workspace
ng generate library my-lib
ng generate application my-app 我想在包json中创建一个npm脚本,它将创建库和应用程序的生产版本,所以在package.json中我添加了: "s
版本。
@角/cli@1.0.0-rc.2
复制步骤。
ng build -prod -e prod
故障给出的日志。
vendor.380a744….bundle.js:218 Error: Runtime compiler is not loaded
at new Error (native)
at Error.d (http://localhost:9000/portal/assets/dist/polyfills.a61f849adcea6ec74b69.bundle.js:36:1731)
at r (http://localhost:9000/portal/
从angular 9开始,angular开始使用名为IVY的新渲染器引擎,正如其文档所说,构建的代码在开发和生产环境中看起来是一样的,并且易于调试,在构建代码时还需要传递--prod和--aot选项吗
旧的构建命令
ng build --aot --prod
新命令不应该是这样的吗?
ng build //for both prod and dev build
或者,prod内部版本只需要--prod选项
我正在制作一个将信息发送到数据库的表单,以便学习使用Angular6和Firebase进行CRUD操作,但是当我提交它时,我得到:
AddNewAnimalComponent.html:5 ERROR TypeError: Cannot read property 'push' of undefined
at AnimalsService.push../src/app/animals.service.ts.AnimalsService.insertAnimal (animals.service.ts:32)
at AddNewAnimalComponent.pu