Initializing the Scully app

I was attempting to initialize a brand new Scully Application inside of a pre-existing Angular app when I came across this error:

Your distribution files are in "dist". Please change that to include a subfolder

This error appeared after I first ran ng add @scullyio/init followed by ng build --prod && npx scully --scanRoutes.

My initial reaction was to think about how Scully outputs the static content for our app.

Scully will output the static content to ./dist/static by default. For this reason, you can't have the outputPath for your Angular application be set to the default dist folder.

Solution to the Error

In your angular.json configuration file in the route of your app, change the following property to something other than dist

projects > architect > build > options > output path

I changed the outputPath of my Angular application to dist/public.

After the update, the build section of my angular.json file looks like this:

"build": {
  "builder": "@angular-devkit/build-angular:browser",
  "options": {
    "outputPath": "dist/public",
    "index": "src/index.html",
    "main": "src/main.ts",
    "polyfills": "src/polyfills.ts",
    "tsConfig": "",

This change to your angular.json will resolve the Your distribution files are in "dist" error message when initializing your Scully app.

FeedbackI'd love to hear your feedback!
Did this blog post help fix your issue? Still having trouble?
Tweet At Me
Brendan SlukeSoftware Engineer

Hi, I'm Brendan Sluke and I love writing code and blogging about software engineering.

Follow Me On Twitter Read My Blog
Recommended Blog PostsBlog Posts I Think You Will Find Interesting
Go Back To Top of Page