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
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.
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.
[email protected] scully
If you meant to build a different project as undefined you can use:
–project differentProjectName as a cmd line option
x Could not find project "undefined" in ‘angular.json’.
The right solutions is here!!!
"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"
}
},
scully.my-blog.config.ts