nstudio / xplat

Cross-platform (xplat) tools for Nx workspaces.
MIT License
369 stars 52 forks source link

[Bug] Error: Cannot find configuration for app in /angular.json after generating new workspace #273

Closed iameduardod closed 3 years ago

iameduardod commented 3 years ago

Steps:

  1. npx create-nx-workspace myworkspace
  2. Choose empty
  3. No to NX Cloud
  4. cd myworkspace
  5. npm i @nstudio/xplat -D
  6. nx g app
  7. name it myapp
  8. Choose web
  9. Default directory (apps)
  10. Yes to routing

Error:

✔ Would you like to configure routing for this app? (Y/n) · true ✔ Packages installed successfully. Error: Cannot find configuration for 'web-myapp' in /angular.json. at Object.readProjectConfiguration (/Users/<retracted>/Development/codebases/myworkspace/node_modules/@nrwl/devkit/src/generators/project-configuration.js:110:15) at updateAppAndE2EProjectConfigurations (/Users/<retracted>/Development/codebases/myworkspace/node_modules/@nrwl/angular/src/generators/application/lib/update-config-files.js:32:30) at Object.updateConfigFiles (/Users/<retracted>/Development/codebases/myworkspace/node_modules/@nrwl/angular/src/generators/application/lib/update-config-files.js:10:5) at /Users/<retracted>/Development/codebases/myworkspace/node_modules/@nrwl/angular/src/generators/application/application.js:39:15 at Generator.next (<anonymous>) at fulfilled (/Users/<retracted>/Development/codebases/myworkspace/node_modules/tslib/tslib.js:114:62) Cannot find configuration for 'web-myapp' in /angular.json.

iameduardod commented 3 years ago

Same error if used npm i @nstudio/xplat@12.4.3 -D

Any thoughts @NathanWalker

NathanWalker commented 3 years ago

@iameduardod I'm investigating this - Nx 12.5 was just released yesterday and appears related. Will release a patch if can find the culprit soon.

NathanWalker commented 3 years ago

https://github.com/nrwl/nx/pull/6170

NathanWalker commented 3 years ago

@iameduardod this is fixed with latest Nx (12.5.1) - you can just use npx create-nx-workspace@latest and it will work properly now.

iameduardod commented 3 years ago

i appreciate your help @NathanWalker ! <3