0

Recently we moved from code-first to Sitecore-first approach. After deploying the react and sitecore in Sitecore-first mode, we can't see the renderings on the page.

Getting below error

"JSS Component is missing React implementation. See the developer console for more information"

Console has below message

Placeholder page-content contains unknown component. Ensure that a React component exists for it, and that it is registered in your componentFactory.js.

enter image description here

  • Did you deploy your app? – Dawid Rutkowski Aug 5 at 15:04
  • yes i used jss deploy files command to push react build files – Rishi Aug 5 at 15:29
  • Could you make sure that that the component name in a rendering item and component name in react app are the same – Artsem Prashkovich Aug 6 at 6:21
  • Have you created JSS build in the connected mode and deployed inside the Sitecore website. Component name should match in both places – AlokBhatt Aug 6 at 10:55
2

This error occurs when the Renderings defined in Sitecore and the components defined in the JSS app do not match.

Rishi - You said you deployed using jss deploy files - this command deploys the JS bundle, but does not create any Sitecore items.

When switching from Code-First to Sitecore-First, it is recommended to use jss deploy app to ensure that files, and Sitecore items (template, rendering definitions) get imported. If you need to import content too, then use jss deploy app -c

When the import runs, pay attention to the output in the terminal. Make sure there are no errors.

If the above steps were followed and you are still seeing this error, check the following:

  • Check that all your JavaScript component names and your Sitecore rendering names match exactly (see src/boot/componentFactory.js for exported JS component names)
  • After a deploy, check the timestamp of the JS bundle in <SitecoreRoot>/dist/appName to verify that it's actually getting deployed. If it's not, verify that the values in your scjssconfig.js and your JSS XML configs (Sitecore path, API path, deployment secret etc) are as expected.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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