-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nx option to have separate project.json
files not supported
#1520
Comments
@lan10rd I looked into your repo, and the root cause is the new NX option to have separated project.json files. We don't support this right now. I will change the title, so we can track the progress on this |
project.json
files not supported
thanks @SanderElias , i pulled the repo and just searched for the above warning/error language, if i can help let me know I am just a little unsure of how to build/try to fix it. i would think it's not necessary to check angular/project/workspace.json for anything if you already specified/found the scully.config.ts, but not sure if a cli option or a config fix is best. it looks like this is the new format for nx workspaces, i had a few thoughts in gitter but yeah just let me know im not sure how recent the nx team made this change! |
@Jefiozie target: 'targets' in config does certainly get passed that i think thats all that was needed! its not getting my routes cause they are all lazy loaded but it think there is support for that for sure, thanks! |
let me fix that with some extra options or something and ill close this issue! |
Lazy routes are well supported in Scully. |
Am hitting this bug too. |
been waiting for this bugs to be fix few months ago. in order to scully workaround on NX izit we add the 'angular.json' manually? |
Until this is officially fixed/supported, you can get it to work by adding |
Also, this is related to #1491 |
Hi, |
Since NX 16, |
There is an open PR that will fix that (#1654), but unfortunately it is not merged or resolved yet |
@stianmorsund thanks, I checked that PR yesterday, but honestly I don't think it is a correct fix. It relies on you having your projects in |
Sure, that would be more resilient. Right now it is not possible to use scully without angular.json though |
Currently im using NX v14.1.9 with Angular v13.3.12. Here my config file scully.web-showroom.config.ts
npx scully --scanRoutes --cf=scully.web-showroom.config.ts its able to generate the static file. Hope can help |
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
<#1520 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJQ6O6SNXQ43T4XMDHOXUDXNIZ4XANCNFSM5LXOZ6NA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I notice after upgrade to nx 15.8 ng15.2.9 scully will hitting this error due to removed workspace.json. If I just add in back the workspace.json will be working fine, even nx no longer need that file. if u have better solution, let us know. must use the following command
|
@SanderElias any eta on this? The Nx Cloud caching does not work with Scully as of Nx v16. In this configuration, the cache is never invalidated, so every build gets old cached results, even when changes are made. We are not aware of a workaround at this time. |
Any update for this ? Without angular.json file ? |
🐞 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.
x Angular distribution files not found, run "ng build" first
Description
🔬 Minimal Reproduction
💻Your Environment
Angular Version:
Scully Version:
🔥 Exception or Error
The text was updated successfully, but these errors were encountered: