Open d-koppenhagen opened 2 years ago
Am running into this too. However,
npx scully --cf scully.myapp.config.ts
does not solve anything.
the same issue here
i tried to run npx scully --project other
using flag target: 'targets'
in my config file. But does not solve.
Could not find project "undefined" in 'angular.json'.
The right solutions is here!!!
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" } },
And name the scully file as scully.my-blog.config.ts
Yeah, defaultProject is deprecated in Angular 14 and removed when you do ng update commands I had to add it again to make scully work as @TatyanaMolchanova said.
Same here. Thanks @TatyanaMolchanova .
Currently im using NX v14.1.9 with Angular v13.3.12. Here my config file
scully.web-showroom.config.ts
import {ScullyConfig, setPluginConfig} from '@scullyio/scully';
import '@scullyio/scully-plugin-puppeteer';
/** this loads the default render plugin, remove when switching to something else. */
import { baseHrefRewrite } from '@scullyio/scully-plugin-base-href-rewrite';
import { getHttp404Plugin } from '@gammastream/scully-plugin-http404';
const Http404Plugin = getHttp404Plugin();
setPluginConfig(baseHrefRewrite, { href: '/abc' });
export const config: ScullyConfig = {
projectRoot: "./apps/web-showroom/src",
projectName: "web-showroom",
distFolder: './dist/apps/web-showroom',
spsModulePath: 'YOUR OWN MODULE PATH HERE',
outDir: './dist/static',
defaultPostRenderers: [Http404Plugin,'seoHrefOptimise', baseHrefRewrite],
target: 'targets',
handle404: 'index',
routes: {
}
};
npx scully --scanRoutes --cf=scully.web-showroom.config.ts
its able to generate the static file. Hope can help
🐞 Bug report
Description
When creating a NX workspace and adding scully, starting it initially won't work and leads to the error message
Could not find project "undefined" in 'angular.json'
(see full error message below).🔬 Minimal Reproduction
1.) create a nx workspace with an angular app
2.) add a node library (this is maybe not necessary)
3.) add scully as described in the scully docs
💻Your Environment
Angular Version:
nx version
:Scully Version:
🔥 Exception or Error
Running
npx scully --pjFirst
will lead to the same result.Handing over the config file explicitely will work: