Plugin Name and Version:
@nxrocks/[email protected]
Nx Version (nx --version
):
11.4.0
Node Version (node -v
):
Current LTS: 14.16.0
NPM Version (npm -v
):
6.14.11
Angular CLI version (ng --version
):
None, it's an empty NX project
Expected Behaviour
When I run nx g @nxrocks/nx-spring-boot:app java-api
and fill out the options, a new java springboot app gets generated
Actual Behaviour
When I run nx g @nxrocks/nx-spring-boot:app java-api
and fill out the options, the generation fails with an error:
Cannot find module '@angular-devkit/core'
Require stack:
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\tao\src\commands\ngcli-adapter.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\tao\src\commands\generate.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\tao\index.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\cli\lib\init-local.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\cli\bin\nx.js
- C:\Users\kwandes\AppData\Roaming\nvm\v14.16.0\node_modules\nx\node_modules\@nrwl\cli\bin\nx.js
- C:\Users\kwandes\AppData\Roaming\nvm\v14.16.0\node_modules\nx\bin\nx.js
After that, I install the missing dependency with npm install @angular-devkit/core
.
The generation fails again with
Cannot find module '@angular-devkit/schematics/tools'
Require stack:
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\tao\src\commands\ngcli-adapter.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\tao\src\commands\generate.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\tao\index.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\cli\lib\init-local.js
- O:\Programming\testing\troubleshoot-nvm\node_modules\@nrwl\cli\bin\nx.js
- C:\Users\kwandes\AppData\Roaming\nvm\v14.16.0\node_modules\nx\node_modules\@nrwl\cli\bin\nx.js
- C:\Users\kwandes\AppData\Roaming\nvm\v14.16.0\node_modules\nx\bin\nx.js
Module '@angular-devkit/schematics/tools' can not be installed via npm
Steps to reproduce the behaviour
Run nvm install 14.16.0
Run nvm use 14.16.0
Run npx create-nx-workspace@latest
- name: troubleshoot
- type: empty
- nx cloud: yes
Run npm install -g [email protected]
Run npm install --save-dev @nxrocks/nx-spring-boot
Run nx g @nxrocks/nx-spring-boot:app java-api
Fill out the info, the generation will fail
Run ยดnpm install @angular-devkit/coreยด
Run nx g @nxrocks/nx-spring-boot:app java-api
Fill out the info, the generation will fail
Notes
- I suspect this is caused by the workspace being an empty project instead of an angular one
- The issue does not occur in an NX workspace with preset Angular
- The Username in windows path
C:\Users\
has been replaced with kwandes