question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AOT Error: Expected 'styles' to be an array of strings.

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
amcdnlcommented, Jul 13, 2017

I was getting this error in my app but didn’t realize it was this proj. I’ll check it out guys!

0reactions
Hypercubedcommented, Sep 21, 2017

Closing… reopen if you see this again.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found