Closed mhamri closed 2 years ago
Hey, thanks for raising this!
What is it about these packages (scully, transloco and Angular Universal) that are failing with Workspace Vesrion 2?
Initiating commands via Nx puts the workspace configuration through a compatibility layer, essentially transforming it back to a schema that Angular understands. (essentially version 1!!)
It would be useful for us to know therefore what it is about these packages that isn't actually working.
this is for scully https://github.com/scullyio/scully/issues/1520
transloco https://github.com/ngneat/transloco/issues/504
transloco- key manager https://github.com/ngneat/transloco-keys-manager/issues/81
and the rest of npm!
we can't run npx
command through nx
. so any libs that provide an executable like scully is currently suffering.
same, I can't run it https://github.com/chrisguttandin/angular-prerender
You should be able to set up a target in project.json and use the run-commands executor?
https://nx.dev/packages/nx/executors/run-commands#nx:run-commands
You can create a target for your app's project.json like:
"scully": {
"executor": "nx:run-commands",
"options": {
"command": "npx scully"
}
}
Then you can do nx run appName:scully
You should be able to set up a target in project.json and use the run-commands executor?
https://nx.dev/packages/nx/executors/run-commands#nx:run-commands
You can create a target for your app's project.json like:
"scully": { "executor": "nx:run-commands", "options": { "command": "npx scully" } }
Then you can do
nx run appName:scully
this works only with npx scully serve
not for npx scully
I tried this: https://github.com/scullyio/scully/issues/1429#issuecomment-1004454984 but still don't work.
So I thought I would just recreate my workspace without this standalone config, but even that does not work there is a flag standaloneConfig
when generating angular apps in nx, but the flag has no effect
@Coly010 I see this was closed as completed. What was the resolution / path forward? Thanks!
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.
Description
workspace version 2 maybe sound good on the paper but to be frank it's a disaster for day to day development. I regret why we even considered migrating to that. almost every npm package has one or two issue with it. it's a total unproductive change in our repo. I would question the design idea behind it by assuming doing a change on framework level you could expect every package adopt it and make developer life easier! for sure it wasn't a good move. after two version of angular still libraries (like scully, transloco, angular universal) has problems and not fully supporting it. after we migrated to workspace v2 there is not a day that we don't face issue with nx , we eagerly look for a method to revert it back as soon as possible!
Motivation
unproductive days spending to debug why ng & npx commands not really working
Suggested Implementation
I am looking for a guide or tool to revert back workspace version
I also didn't see guide that mention how when we are creating a new nx workspace opt out of workspace v2
Alternate Implementations
recreate with a lower nx version and don't migrate?! or migrate to other mono repo solutions