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?

2 Answers 2

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.

0

I saw the same error while doing import.

Just make sure config file name '/sitecore/config/*.config' matches to your site's 'name' property in config.

For ex.

/sitecore/config -> **sitecore-jss**.config

And inside config:

<site patch:before="site[@name='website']"
            inherits="website"
            **name="sitecore-jss"**
            hostName="sc93sc-jss.dev.local"
            rootPath="/sitecore/content/sitecore-jss"
            startItem="/home"
            database="master" /> 

Hope this will solve your issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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