scully: Nx option to have separate `project.json` files not supported

🐞 Bug report

Tried on ubuntu, windows, and mac os with node 14.17.0, using the latest nx create workspace. No matter what extra cli or config changes i make i constantly face a problem where it can’t find angular.json (this is a apps/core nrwl nx monorepo, i dont even think its possible to use the angular.json variant anymore but idk, all the new nrwl workspaces have a workspace.json and each project has its own project.json).

root@docker-ubuntu-s-4vcpu-8gb-nyc3-01:~/workspace# npx scully --project x ✔ Folder “./scully” used for custom plugins scully: using project config from “apps/x” x Could not find project “x” in ‘angular.json’. ⚠ Deprication Notice: ====================================================================== From now on, the plugin that is being used to render a route is able to be changed by the user. You can do this by adding or enabling the plugin in the scully.json file. For your convenience, we loaded the Puppeteer plugin for you.

     To disable this warning enable the plugin of your choiche.
     for Puppteer please add:
         import '@scullyio/scully-plugin-puppeteer';
      to your scully.docs-app-ng.config.ts file.

      When you get this waring while not using scully-plugin-puppeteer
      you need to set the defaultRouteRenderer to the name of your plugin.
      The defaultRouteRenderer is now set to 'routeRenderer'.
   ======================================================================

x Angular distribution files not found, run “ng build” first

Description

🔬 Minimal Reproduction

💻Your Environment

Angular Version:





Scully Version:





🔥 Exception or Error




About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Reactions: 2
  • Comments: 20 (7 by maintainers)

Most upvoted comments

All,

We are currently redoing the schematics, and splitting out NX support in a specialized NX add-on that will extend our CLI schematics. Once this one is done, (I expect soonish) we will release V3.1.0 beta. This should solve the current installation issues

Op di 27 jun 2023 om 03:32 schreef FanYeeChok @.***>:

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 @./scully’; import @./scully-plugin-puppeteer’; /** this loads the default render plugin, remove when switching to something else. / import { baseHrefRewrite } from @./scully-plugin-base-href-rewrite’; import { getHttp404Plugin } from @.*/scully-plugin-http404’;

const Http404Plugin = getHttp404Plugin(); setPluginConfig(baseHrefRewrite, { href: ‘/hlf/sg/ib/’ });

export const config: ScullyConfig = { projectRoot: “./apps/web-showroom/src”, projectName: “web-showroom”, spsModulePath: ‘YOUR OWN MODULE PATH HERE’, outDir: ‘./dist/static’, defaultPostRenderers: [Http404Plugin,‘seoHrefOptimise’, baseHrefRewrite], target: ‘targets’, handle404: ‘index’, routes: { } }; `

package.json i just use the following scripts

“scripts”: { … “scully”: “npx scully – --project web-showroom” … }

npm run scully

its able to generate the static file. Hope can help

— Reply to this email directly, view it on GitHub https://github.com/scullyio/scully/issues/1520#issuecomment-1608571539, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJQ6O6SNXQ43T4XMDHOXUDXNIZ4XANCNFSM5LXOZ6NA . You are receiving this because you were mentioned.Message ID: @.***>

Until this is officially fixed/supported, you can get it to work by adding target: 'targets' inside the Scully-config as mentioned here: https://github.com/scullyio/scully/issues/1429