nx build should build a fresh/clean project.
nx build throw this error
Cannot find module '@angular/compiler'
Run these commands in order
Observe error
Cannot find module '@angular/compiler'
Here's a repo with the generated code https://github.com/snebjorn/nx-test
Every command run have its own commit so it's easy to see the diff
> NX Report complete - copy this into the issue template
@nrwl/angular : 9.1.0
@nrwl/cli : 9.1.0
@nrwl/cypress : 9.1.0
@nrwl/eslint-plugin-nx : Not Found
@nrwl/express : Not Found
@nrwl/jest : 9.1.0
@nrwl/linter : Not Found
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/react : Not Found
@nrwl/schematics : Not Found
@nrwl/tao : 9.1.0
@nrwl/web : Not Found
@nrwl/workspace : 9.1.0
typescript : 3.7.5
The shell output (slightly cleaned up)
https://gist.github.com/snebjorn/a9e7119ea04e75f37231a4b12807dabd
Besides the build error a bunch of warnings were shown during the setup. I think it would be best to get that sorted out.
Examples: (see the shell output for context)
warning "create-nx-workspace > @nrwl/[email protected]" has unmet peer dependency "prettier@^1.19.1".
warning " > @nrwl/[email protected]" has incorrect peer dependency "prettier@^1.19.1".
warning: LF will be replaced by CRLF in .editorconfig.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .prettierignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .prettierrc.
...
warning "@nrwl/angular > @nrwl/[email protected]" has unmet peer dependency "cypress@>= 3 < 5".
warning "@nrwl/angular > [email protected]" has unmet peer dependency "rxjs@^6.4.0".
warning "@nrwl/angular > @nrwl/cypress > @cypress/[email protected]" has unmet peer dependency "webpack@^4.18.1".
warning "@nrwl/angular > @nrwl/cypress > @cypress/webpack-preprocessor > [email protected]" has unmet peer dependency "webpack@>=2".
The issue here is that there is no @angular packages because no application has been generated.
https://github.com/snebjorn/nx-test/blob/master/package.json#L32
We should add those packages when generating an angular library.
For now, to trigger this manually, you can run:
nx g @nrwl/angular:ng-add
Most helpful comment
The issue here is that there is no
@angularpackages because no application has been generated.https://github.com/snebjorn/nx-test/blob/master/package.json#L32
We should add those packages when generating an angular library.
For now, to trigger this manually, you can run: