0

I migrated an Angular 8 library project to Angular 9. In my root tsconfig.json enableIvy is false. The library builds find and the unit tests pass.

When I start an app (also within the same library project) via "ng serve" I get the error "ERROR in document is not defined". However, if I set enableIvy to true for the app in tsconfig.app.json then the app starts.

How come I can't start the app with Ivy disabled?

Scott Walter
  • 9,426
  • 4
  • 18
  • 23
  • Need more info on error. – JWP Nov 06 '20 at 01:08
  • Angular would only report back "ERROR in document is not defined"." and nothing else. I did track it down to an issue in one my library's secondary endpoint components. This line in a .scss file was culprit: @import "../../../../../node_modules/nouislider/distribute/nouislider.min.css";. If remove the import then the issue goes away. Any ideas? – Scott Walter Nov 06 '20 at 14:07
  • Tough issue, it's probably coming from webpack at build time. Try this delete package. Lock.Json then run npm ci – JWP Nov 06 '20 at 16:07

0 Answers0