[ivy] ERROR in Expected array when reading property exports using concat()
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/cli ?Is this a regression?
NODescription
When using .concat() to concat two arrays in the exports
field of a Module, ivy throws an
ERROR in Expected array when reading property exports
The compiled version of the package @swimlane/ngx-charts
contains such an concat() that seems to prevent ivy to recognize the export variable as array.
Removing concat()
and merge the arrays by hand resolves the error.
Since concat()
returns an Array
itself, I see the issue in angular / ivy, not in the ngx-charts package.
The line of the source: https://github.com/swimlane/ngx-charts/blob/4d9f58b1b8ec3127b408964c373613ee961dee71/src/common/chart-common.module.ts#L61
π¬ Minimal Reproduction
Checkout: https://github.com/maltehol/ivy-ngx-charts and run ng build
π₯ Exception or Error
ERROR in Expected array when reading property exports
π Your Environment
Angular Version:
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ β³ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 8.0.0-beta.11
Node: 11.13.0
OS: win32 x64
Angular: 8.0.0-beta.11
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.800.0-beta.11
@angular-devkit/build-angular 0.800.0-beta.11
@angular-devkit/build-optimizer 0.800.0-beta.11
@angular-devkit/build-webpack 0.800.0-beta.11
@angular-devkit/core 8.0.0-beta.11
@angular-devkit/schematics 8.0.0-beta.11
@angular/@types <error>
@angular/events <error>
@angular/rxjs <error>
@angular/tslib <error>
@angular/typescript <error>
@ngtools/webpack 8.0.0-beta.11
@schematics/angular 8.0.0-beta.11
@schematics/update 0.800.0-beta.11
rxjs 6.4.0
typescript 3.3.4000
webpack 4.29.6
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11 (5 by maintainers)
Top Results From Across the Web
"ERROR in Expected array when reading property imports ...
bug Something isn't working ivy needs-refinement Issue is approved but definition and acceptance criteria need improvement. Projects.
Read more >Error when implementing charts.js in angular - Stack Overflow
First you define chart as an empty array and then you try to override it with an object. Angular does not like this...
Read more >akita-state-management/Lobby - Gitter
Ok random question, trying to use the arrayUtils in a Store (non-entity) and ... ERROR TypeError: Cannot assign to read only property 'expanded'...
Read more >Communicating with backend services using HTTP - Angular
The asynchronous method sends an HTTP request, and returns an Observable that emits the requested data when the response is received. The return...
Read more >A Practical Guide to Angular Elements - Nitay Neeman's Blog
Learn about the final changes of Angular Elements concerning Angular v6 and how to install, create and use an embeddable Custom ElementΒ ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@JoostK we can confirm using spread syntax in module declaration triggers the error
ERROR in Expected array when reading property declarations
each time.Itβs quite useful to be able to use spread syntax when importing/exporting/declaring large number of modules/components.
I have the same with 8.0.0-rc.1