Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile entry-point @codebakery/origami/styles (module as esm5) due to compilation errors #101

Closed
nagarajhubli opened this issue Mar 27, 2020 · 2 comments

Comments

@nagarajhubli
Copy link

I am building a demo app to showcase usage of Polymer 3.x with Angular 9.x, and I am getting the following error while building

ERROR in Failed to compile entry-point @codebakery/origami/styles (module as esm5) due to compilation errors:
node_modules/@codebakery/origami/fesm5/origami-styles.js:587:24 - error NG2005: The class 'ShadyCSSSharedStylesHost' cannot be created via dependency injection, as it does not have an Angular decorator. This will result in an error at runtime.

Either add the @Injectable() decorator to 'ShadyCSSSharedStylesHost', or configure a different provider (such as a provider with 'useFactory').


587             providers: [SHADYCSS_SHARED_STYLES_HOST_PROVIDER]
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/@codebakery/origami/fesm5/origami-styles.js:501:5
    501 var ShadyCSSSharedStylesHost = /** @class */ (function (_super) {
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    502     __extends(ShadyCSSSharedStylesHost, _super);
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ... 
    542     return ShadyCSSSharedStylesHost;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    543 }(ɵDomSharedStylesHost));
        ~~~~~~~~~~~~~~~~~~~~~~~~
    'ShadyCSSSharedStylesHost' is declared here.

Angular version is 9.1.0
Polymer version is 3.3.1
Origami version is 3.1.2

Node - v12.0.0
NPM - 6.9.0

@nagarajhubli nagarajhubli changed the title ERROR in Failed to compile entry-point @codebakery/origami/styles (module as esm5) due to compilation errors Failed to compile entry-point @codebakery/origami/styles (module as esm5) due to compilation errors Mar 27, 2020
@nagarajhubli
Copy link
Author

The application builds fine if I opt out of the default Ivy engine which comes with Angular 9.x, followed the instructions from here - https://angular.io/guide/ivy#opting-out-of-ivy-in-version-9

@asyncLiz
Copy link
Collaborator

Duplicate of #99. Origami does not yet support Angular 9 or Ivy, but I'm happy to accept a PR adding it!

asyncLiz added a commit that referenced this issue Apr 7, 2020
* Added angular dev kit

* Updated to angular 9

* Reverting changes

* Made type changes

* Upgraded to angular 9

* Added npm ignore file

* Added factory for sharedstyles host

* Deleted npmignore file

* Added comment

* Update styles/src/shadycss/shared-styles-host.ts

Co-Authored-By: Liz Mitchell <asyncliz@gmail.com>

Co-authored-by: Liz Mitchell <asyncliz@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants