0

While bulding JSS app i am getting an error.

Command : JSS Build

Error:

ERROR in Error during template compile of 'StyleguideAngularLazyLoadingModule'

Function calls are not supported in decorators but 'JssModule' was called

The above error is blocking me to deploy my app on the Sitecore.

Additionaly can any one share a link to create good production quality website(powered with Sitecore) demo in JSS Angular.

Thank you,

  • Take a look in this sample app that uses JSS made by Sitecore Demo team -> github.com/Sitecore/Sitecore.HabitatHome.Omni . – Peter Procházka Jan 8 at 7:17
  • Thank you, Is it compatible with Sitecore 9.0.0.0 rev171002? – Pankaj Jan 8 at 7:30
  • I must say, getting JSS with Angular running seems to be frustrating. I installed JSS last Friday (1/4). Yesterday I created an Angular app following the Quick Start, and ran into bug #90. OK, so then I tried to clone the JSS dev branch, build and deploy the Angular sample. But now running into the AOT bug, even after changing the package.json to ^7.0.4. We are currently using Sitecore 7.2, but developing new apps in Angular, and I am trying to make the case that we need to move to 9.1, but can't seem to even put together a simple demo of SC 9.1 with Angular.... :-( – Gary Williams Jan 8 at 18:55
  • sorry to put this as an answer. I don't have those many reputations to put it as a comment. I updated the reference to 11.0.0 as suggested by Kamsar. But I am still getting the same error. Am I missing something? The Sitecore version is 9.0.2 Thanks for your help > { "_from": "@sitecore-jss/sitecore-jss-angular@11.0.0", "_id": "@sitecore-jss/sitecore-jss-angular@11.0.0", "_inBundle": false, "_integrity": "sha512-kRKGQ7peNRT41dyWyQGo9qQq/WIO23BCFlxx87i5RyWuiZnLOis5lsqBw4iDNz2a4hO2eqZOTb9hbp+327GbLA==", "_location": "/@sitecore-jss/sitecore-jss-angular", "_phantomChildren": {}, "_requested": { " – JustDoIt Jan 14 at 15:26
3

This is caused by an AOT bug in @sitecore-jss/sitecore-jss-angular@11.0.1.

Pinning your dependency to 11.0.0 (with no ~ nor ^) should resolve the issue for now. This is probably related to this PR

  • Very cool, Kam! I downgraded to 11.0.0 and all is good. For now, since this is only at the feature demo stage, using 11.0.0 is good. Once we move into the real code, hopefully some of the Angular problems should work better. Appreciate the help! – Gary Williams Jan 8 at 20:26
  • Hey could you please confirm i just need to update the following line in package.json to@sitecore-jss/sitecore-jss-angular": "~11.0.0" and run npm install. if so, then i am still acing the same issue. – Pankaj Jan 9 at 18:46
  • Hey I did the same but no luck still facing the same issue. Tried it both ways by pinning only angular dependency and pinning all packages dependencies(from ^11.0.0.1 to ~11.0.0.0) – Pankaj Jan 10 at 5:16
  • @Pankaj do not use ~ or ^ - you want 11.0.0 and only 11.0.0. – Kam Figy Jan 14 at 15:44
0

Based on your comment

"Thank you, Is it compatible with Sitecore 9.0.0.0 rev171002? – Pankaj 2 days ago"

Assuming your sitecore version is Sitecore 9.0.1 which will not be supported with JSS.. Refer the server setup link here, https://jss.sitecore.com/docs/getting-started/jss-server-install

The JSS server components require Sitecore 9.0 Update-1 or later. Install Sitecore according to the instructions for your version available on the dev site.

Upgrade your version to 9.0.1 or 9.0.2. Personally I would recommend to upgrade to Sitecore 9.1

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.