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.

Nx 8.4.x workspaces don't have angular.json file

See original GitHub issue

I see that release 8.4.0 stopped adding an angular.json file after creating an empty workspace with npx create-nx-workspace myworkspace. This appears correct if Nx is moving to a generic monorepo workspace for web development and an empty workspace was selected when creating the workspace. However, after running yarn add @nrwl/angular and then run ng g @nrwl/angular:application myapp I get the following error Annotation 2019-08-04 140427

Also, nx.json file still has angular.json under implicitDependencies with the empty workspace.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:14 (3 by maintainers)

github_iconTop GitHub Comments

8reactions
GreQcommented, Mar 6, 2020

I’ve started getting into nx-workspace and noticed a lack of information about which cli to use. I thing it’s a big issue when getting started and first prompt you get while creating an nx-workspace is the option to use nx - or ng cli and no documentation to be found explaining the pros and cons. If my intention is to build angular apps, but not exclusively, side by side with react, web, etc.: what’s best choice? Good spot to target the issue would be https://nx.dev/angular/getting-started/nx-and-cli. Does the usage of the ng-cli limit workspace capability? Does “nx g @nrwl/angular:foobar” the same job as “ng g foobar”, just with the difference of naming the config file angular - or workspace.config. Confusion is complete when reading/watching tutorials where nx-cli is used for angular app development not mentioning why this decision was made and ng-console turns out to be nx-console now. Does nx-console support the use of ng-cli powered by nrwl schematics and builders? Some documentation about pros and cons in under which context would be very helpful!

4reactions
brandonrobertscommented, Aug 12, 2019

@ahnpnl if you’re primarily using Angular, you should be using the ng commands like they are in the Angular tutorial. If you’re primarily using React or Web Components, you should be using the nx commands. The difference is that there is only a workspace.json when primarily only using React or Web Components. The nx command delegates appropriately, but we could define this more clearly in the docs for the Nx CLI here: https://nx.dev/react/guides/cli

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nx and the Angular CLI
Nx supports using angular.json to configure projects and their targets, but it comes with a few limitations. For instance, angular.json can be many...
Read more >
Angular.json Invalid in Nx Workspace - Stack Overflow
I recently migrated a usual Angular Application into an Nx Workspace. Badly, I always get an error when trying to run any command...
Read more >
@Nrwl/Community
I have a file located in apps/myapp/src/tests/foo.spec.js with myapp/src being the root of this project. Yet workspace-lint claims foo.spec.js does not belo...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
systemPrefs with at least two files" status:RESOLVED resolution:OBSOLETE ... Bug:101884 - "Get an ops message from the kernel with version 2.6.13.x" ...
Read more >
angular-eslint - Bountysource
When creating an angular 12 workspace, @angular-eslint/schematics@12.0.0 schematics incorrectly writes eslintrc.json ❯ npx @angular/cli@12 new web-apps ...
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