skip to Main Content

When I created my Angular app and tried to add Scully for SEO static it just silently failed without creating:

  • scully.my-blog{{your blog name here}}.config.ts
  • scully folder in the root of the app with tsconfig.json and plugins folder with plugin.ts file

I used the command as in the Scully documentation:
https://scully.io/docs/learn/overview/

ng add @scullyio/init

2

Answers


  1. Chosen as BEST ANSWER

    The problem was here that there was not defined the name of the project as the option of this CLI command.

    The right solutions is here:

    ng add @scullyio/init --project=my-blog

    where my-blog is the name of my project

    And yes, there was yet several npm issues - I have an Angular app of 14 version but angular/animations needs to be "@angular/animations": "^12.2.16" - you need to change the version in your package.json, and it doesn't work until I run

    npm install --legacy-peer-deps.


  2. Previous answer is not solving the issue.

    PS D:ANGULAR-PROJECTSmy-blog> ng generate @scullyio/init:markdown
    ? What name do you want to use for the module? posts
    ? What slug do you want for the markdown file? id
    ? Where do you want to store your markdown files? mdfiles
    ? Under which route do you want your files to be requested? posts
    No scully configuration file found scully.undefined.config.ts
    Path "/scully.undefined.config.ts" does not exist.

          scully.<projectName>.config.ts
      where <projectName> is the name of the project as defined in the 'angular.json' file
      If you meant to build a different project as undefined you can use:
          --project differentProjectName as a cmd line option
    
      When you are in a mixed mono-repo you might need to use the --pjFirst flag.
    

    [email protected] scully
    If you meant to build a different project as undefined you can use:
    –project differentProjectName as a cmd line option

      When you are in a mixed mono-repo you might need to use the --pjFirst flag.
       which will look for package.json instead of angular.json to find the 'root' of the project.
    =====================================================================================================
    

    x Could not find project "undefined" in ‘angular.json’.

    The right solutions is here!!!

    1. in angular.json add in the root of the object:

    "defaultProject": "my-blog",

    {
    "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
    "version": 1,
    "newProjectRoot": "projects",
    "defaultProject": "my-blog",
    "projects": {
    "my-blog": {
    "projectType": "application",
    "schematics": {
    "@schematics/angular:component": {
    "style": "scss"
    }
    },

    1. And name the scully file as
      scully.my-blog.config.ts

    scully undefined solved

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search