nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.39k stars 2.33k forks source link

Transitioning Angular 12 workspace to nx fails - using ng add #7885

Closed hknoerrer closed 2 years ago

hknoerrer commented 2 years ago

Current Behavior

I'm going to convert my Ionic/Anglar12/Cordova Workspace to Nx but it fails:

ng add @nrwl/workspace@12 
Using package manager: npm
Package information loaded.

The package @nrwl/workspace@12 will be installed and executed.
Would you like to proceed? Yes
Package successfully installed.
Cannot read properties of undefined (reading 'build')

Expected Behavior

Should convert the angular workspace to nx workspace.

Steps to Reproduce

To rule out other errors i tried this with a minimal setup (only Angular12).

ng new testMigrateAngular12ToNx --routing --style=css
cd testMigrateAngular12ToNx
ng add @nrwl/workspace@12

But got the same error.

Failure Logs

Environment

npm list -g --depth=0 1 ↵ /Users/xxx/.nvm/versions/node/v16.13.0/lib ├── @angular/cli@12.2.13 ├── @ionic/cli@6.18.1 ├── @openapitools/openapi-generator-cli@2.4.4 ├── caniuse-api@3.0.0 ├── cordova-res@0.15.3 ├── cordova@10.0.0 ├── corepack@0.10.0 ├── depcheck@1.4.2 ├── http-server@14.0.0 ├── json-server@0.17.0 ├── lerna@4.0.0 ├── lighthouse@9.0.0 ├── native-run@1.5.0 ├── npm-check@5.9.2 ├── npm@7.24.2 ├── nx@12.10.0 ├── sharp@0.29.3 ├── tldr@3.3.7 ├── ts-node@10.4.0 └── typescript@4.3.5


nx report

NX Report complete - copy this into the issue template

Node : 16.13.0 OS : darwin arm64 npm : 7.24.2

nx : 12.10.0 @nrwl/angular : Not Found @nrwl/cli : 12.10.0 @nrwl/cypress : Not Found @nrwl/devkit : 12.10.0 @nrwl/eslint-plugin-nx : Not Found @nrwl/express : Not Found @nrwl/jest : 12.10.0 @nrwl/linter : 12.10.0 @nrwl/nest : Not Found @nrwl/next : Not Found @nrwl/node : Not Found @nrwl/nx-cloud : Not Found @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 12.10.0 @nrwl/web : Not Found @nrwl/workspace : 12.10.0 @nrwl/storybook : Not Found @nrwl/gatsby : Not Found typescript : 4.3.5

leosvelperez commented 2 years ago

Thanks for reporting this!

This has been fixed and you can transition your Angular v12 application to Nx v13.1.5 by running:

ng add @nrwl/workspace@13.1.5

That's the latest Nx version supporting Angular v12 and where this issue is fixed.

I'm closing this.

github-actions[bot] commented 1 year ago

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.