nx: Cannot generate new app with nx 7.6

Please make sure you have read the submission guidelines before posting an issue

Prerequisites

Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I’m reporting the issue to the correct repository (not related to Angular, AngularCLI or any dependency)

Expected Behavior

ng g @nrwl/schematics:application app-name should create new app and app-name folder in apps folder

Current Behavior

ng g @nrwl/schematics:application app-name returns Path "/apps/app-name-e2e/tsconfig.e2e.json" does not exist.

Failure Information (for bugs)

Path "/apps/app-name-e2e/tsconfig.e2e.json" does not exist.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. step 1
  2. step 2

Context

Please provide any relevant information about your setup:

  • version of Nx used 7.6.2
  • version of Angular CLI used 7.3.3
  • angular.json configuration
  • version of Angular DevKit used
  • 3rd-party libraries and their versions
  • and most importantly - a use-case that fails

A minimal reproduce scenario using allows us to quickly confirm a bug (or point out coding problem) as well as confirm that we are fixing the right problem.

Failure Logs

Please include any relevant log snippets or files here.

Other

Any other relevant information that will help us help you.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 5
  • Comments: 20 (3 by maintainers)

Most upvoted comments

I experienced this issue last week as well: ng g lib ui resulted in an Path "/libs/ui/src/lib/ui.service.spec.ts" does not exist.error. After removing old schematics from the angular.json file everything worked again as expected (longger version here for reference: https://github.com/nrwl/nx/issues/1937#issuecomment-544377735_)

Try this: check for “newProjectRoot” in the angular.json and remove it entirely

Using nrwl/nx 7.6.2 and nrwl/schematics 7.6.2 AND roll back to cli 7.3.1 fixed this issue.

With latest CLI, I got this error during generating a lib (yes, with latest nrwl/schematics…): nx-generate-issue

What’s the breaking change and how should we migrate our project?

Hi all,

This issue should have been resolved. Both, new workspaces and migrated ones should be locked to CLI 7.3.1. CLI 7.3.3 has a breaking change for Nx so please do not use it.

People who migrated from 7.5.x to 7.6.0 then to 7.6.2 might not receive the fix so please lock the version of @angular/cli to 7.3.1 manually.

Can someone please provide steps to reproduce?

Are you using create-nx-workspace? yarn update? ng add?

See related issue: https://github.com/nrwl/nx/issues/1096

@intuvision I was very hopeful, but your workaround doesn’t work for me 😦

Version 7.3.4 for Angular CLI fixed the issue on our side (generating lib inside an existing repo).

I used create-nx-workspace to create new workspace first. next I updated dependencies. But I have locked @angular/cli version to 7.3.1 and it’s work. thanks @FrozenPandaz