7

I'm attempting to import one of the JSS sample applications and I'm getting the following error after running the npm run package command:

Fatal error occurred while running import process.
Exception: Sitecore.Install.Utils.InstallationException
Message: Could not find JSS app configuration for 'JssAdvancedApp'. Ensure you have included or previously installed a configuration patch for the app.
Source: Sitecore.JavaScriptServices.AppServices
    at Sitecore.JavaScriptServices.AppServices.UpdatePackage.PostInstallImportApp.DoRun(ILog logger, NameValueCollection metadata)
    at Sitecore.JavaScriptServices.AppServices.UpdatePackage.PostInstallImportApp.Run(ILog logger, NameValueCollection metadata)

What am I missing here? What's an app configuration?

8

In order to import a JSS application using the code-first approach, or to utilize server-side rendering for either a code-first or Sitecore-first JSS application, you need to first create an app configuration using a Sitecore configuration patch. There is an example minimal app configuration patch installed with JSS at

\App_Config\Sitecore\JavaScriptServices\Sitecore.JavaScriptServices.ExampleApp.config.example

The App Configuration documentation linked above provides information on all the available attributes for your app.

For the sample apps, this is actually even easier, as a configuration patch is provided for you. Assuming you provided the correct web root path during npm run setup (check scjssconfig.json), simply execute

npm run config:deploy

... and the config patch will be copied to your Sitecore instance.

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.