question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StandaloneConfig improvements

See original GitHub issue

Description

It would be nice if the recommended standaloneConfig would be enabled by default when running npx create-nx-workspace Or add it as an options/configuration e.g.

npx create-nx-workspace --standalone-config or/and as part of the questions

npx create-nx-workspace --preset=angular
Need to install the following packages:
  create-nx-workspace
Ok to proceed? (y)
✔ Workspace name (e.g., org name)     · my-space
✔ Application name                    · my-app
✔ Default stylesheet format           · scss
✔ Use standalone configuration Y/n . Yes.   <=================
✔ Use Nx Cloud? (It's free and doesn't require registration.) · No

Set default configuration

After running nx g @nrwl/workspace:convert-to-nx-project --all newly created apps/libs do not have a standaloneConfig by default. It would be nice if these would be set as default in the nx.json

"generators": {
    "@nrwl/angular:application": {
      ...
      "standaloneConfig": true
    },
    "@nrwl/angular:library": {
      ...
      "standaloneConfig": true
    },

With Angular update angular.json version number

When running the convert command you will get the error:

nx g @nrwl/workspace:convert-to-nx-project --all

NX Only workspaces with version 2+ support project.json files.
To upgrade change the version number at the top of /angular.json and run 'nx format'.

v2+ Required

It would be nice if the version number would automatically be updated to 2, instead of throwing an error

Related

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
the-ultcommented, Jan 18, 2022

Another thing which might be interesting to address as well is that sometimes errors occur, when running nx commands:

❯ nx cache clear    
Unable to read workspace file '.../.../angular.json': Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]

❯ nx lint
Unable to read workspace file '/.../.../angular.json': Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]
❯ pnpm nx test   
> .....
> nx "test"

Unable to read workspace file '/.../.../.../angular.json': Invalid format version detected - Expected:[ 1 ] Found: [ 2 ]
 ELIFECYCLE  Command failed with exit code 1.
1reaction
Coly010commented, Jan 17, 2022

New Angular workspaces will be using standalone config and it’s on our internal roadmap to address existing workspaces. I’ll close this issue for now 😃

Thanks for raising it!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Per-project configuration, Storybook support for Angular 12 ...
Generating new standalone projects is done by passing the --standaloneConfig flag. nx g @nrwl/react:app my-app --standaloneConfig. To convert ...
Read more >
Nx After Dark: Migrating to standalone project configurations
Migrating the Angular Tour of Heroes routing tutorial Nx workspace to standalone project configurations to reduce merge conflicts and ...
Read more >
Using standalone configuration synchronization
Network interruptions occur during firmware upgrades: when upgrading the firmware, all members in the standalone-config-sync group are upgraded simultaneously.
Read more >
The standalone Package
The standalone bundle allows users to easily place picture environ- ments or other material in own source files and compile these on their...
Read more >
How to change the conversion executable with standalone - TeX
If I write the following standalone.cfg file \standaloneconfig{ multi=false, crop, convert={ convertexe=sips, outext=.png, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found