covalent: AOT Webpack build fail: Properties are private

This repository’s issues are reserved for feature requests and bug reports.

Do you want to request a feature or report a bug?

Bug

Bug Report

When trying to execute AOT compilation using webpack a number of files won’t compile as properties are marked as private: Errors such as the following are received:

Error in bail mode: [at-loader] compiled/node_modules/@covalent/core/data-table/data-table.component.ngfactory.ts:200:48 TS2341: Property ‘_templates’ is private and only accessible within class ‘TdDataTableComponent’.

This happens on the @ViewChild() and @ContentChildren() properties so to fix the problem, the following properties need to be marked as public:

_templates in core/file/file-input/data-table.component.ts. (line 72) _inputElement in in core/file/file-input/file-input.component.ts (line 52) _drawerMenu in core/layout/navigation-drawer/navigation-drawer.component.ts (line 35) _searchInput in core/search/search-box/search-box.component (line 28) _input in core/search/search-input/search-input.component (line 28) _content in core/steps/step.component (line 54)

To build my project, I am using the Webpack scripts found here:

https://github.com/AngularClass/angular2-webpack-starter

Screenshots or link to CodePen/Plunker/JSfiddle

N/A

What is the expected behavior?

N/A

What is the motivation / use case for changing the behavior?

N/A

Which version of Angular and Material, and which browser and OS does this issue affect?

Versions from package.json:

angular: 2.4.7 covalent/core: ^1.0.0-beta.2

Other information

(e.g. detailed explanation, stacktraces, related issues, suggestions how to fix)

have not tested the optional or external component libraries.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 17 (14 by maintainers)

Most upvoted comments

I downgraded the Angular Cli to “@angular/cli”: “1.0.0-rc.4” to get by until that is released.

@emoralesb05 sorry, I created a brand new project with Angular Cli. It is not a clone of covalent-quickstart