AOT Error: Expected 'styles' to be an array of strings.
See original GitHub issueI have created an empty project with a repro of the issue:
https://github.com/RicardoVaranda/ngx-ui-aot-bug
I’ve simply added the drawer component as an example to the project and tried to
ng build --prod
or
ng server --aot=true
Here is the error stack:
ERROR in Expected 'styles' to be an array of strings.
ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/Users/ricardo_varanda/Projects/ngx-ui-aot-bug/src'
@ ./src/main.ts 4:0-74
@ multi webpack-dev-server/client?http://localhost:4200 ./src/main.ts
Seems to be related to https://github.com/webpack-contrib/style-loader/issues/123
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
"Expected 'styles' to be an array of strings." when a stylesheet ...
This is a bug, but a hard one to fix... it happens because we need to identify which files are loaded in one...
Read more >"Uncaught Error: Expected 'styles' to be an array of strings ...
I faced this issue with css-loader version higher than 1.0.0. Reverted it back to my older version which is 0.28.0 and it worked...
Read more >Expected 'styles' to be an array of strings-angular.js
In the styles array, you have array of objects with key "input",. It should be a simple array of strings. Try like this:...
Read more >angular/angular-cli - Gitter
No bundle time errors but when loading I get assertions.js:19 Uncaught Error: Expected 'styles' to be an array of strings. The styles parameter...
Read more >AOT metadata errors - Angular
AOT metadata errorslink · Expression form not supportedlink · Reference to a local (non-exported) symbollink · Only initialized variables and constantslink.
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

I was getting this error in my app but didn’t realize it was this proj. I’ll check it out guys!
Closing… reopen if you see this again.