ionic-team / stencil-ds-plugins-demo

This is a demo project using the stencil-ds-plugins.
MIT License
44 stars 20 forks source link

app-angular has runtime error on start #14

Open bigfish opened 4 years ago

bigfish commented 4 years ago

Steps to Repro:

  1. Clone repo

  2. npm install

  3. lerna bootstrap

  4. build component-library

  5. build component-library-angular

  6. 'npm start' app-angular

  7. Open http://localhost:4200 in Chrome (80)

  8. See following error in console (twice)

AppComponent.html:3 ERROR NullInjectorError: StaticInjectorError(AppModule)[DemoComponent -> ChangeDetectorRef]: StaticInjectorError(Platform: core)[DemoComponent -> ChangeDetectorRef]: NullInjectorError: No provider for ChangeDetectorRef! at NullInjector.push../node_modules/@angular/core/fesm5/core.js.NullInjector.get (http://localhost:4200/vendor.js:89853:25) at resolveToken (http://localhost:4200/vendor.js:101046:24) at tryResolveToken (http://localhost:4200/vendor.js:100990:16) at StaticInjector.push../node_modules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:4200/vendor.js:100892:20) at resolveToken (http://localhost:4200/vendor.js:101046:24) at tryResolveToken (http://localhost:4200/vendor.js:100990:16) at StaticInjector.push../nodemodules/@angular/core/fesm5/core.js.StaticInjector.get (http://localhost:4200/vendor.js:100892:20) at resolveNgModuleDep (http://localhost:4200/vendor.js:109362:29) at NgModuleRef.push../nodemodules/@angular/core/fesm5/core.js.NgModuleRef.get (http://localhost:4200/vendor.js:110033:16) at resolveDep (http://localhost:4200/vendor.js:110404:45)

  1. Despair :(

I have looked into related issues, but their suggested solutions either didn't work, or the issue was closed without solution.

bigfish commented 4 years ago

Anyone? :)

Paul-Hebert commented 4 years ago

I'm getting this same error. I'm not sure how to work around this. Did you ever find a solution @bigfish ?

Paul-Hebert commented 4 years ago

@bigfish I was able to fix this by adding this to /packages/app-angular/tsconfig.json in the compilerOptions section:

    "paths": {
      "@angular/*": [
          "node_modules/@angular/*"
      ],
    }