Fails to lint library
See original GitHub issueCurrent Behavior
I have an Nx project (not an Angular one). And I have created a lib named ‘api’.
If I execute: npm run lint api
it fails with the following error:
Cannot find module ‘@angular-devkit/build-angular/package.json’
If I install @angular-devkit/build-angular
, everything works as expected.
But I suppose, it should be already installed by Nx. I don’t think, it’s correct if I install it by myself.
Expected Behavior
It should successfully perform linting of my library.
I don’t know whether it was working before, because I haven’t used Nx before.
Steps to Reproduce
Just create an Nx project (not an Angular one) and run aforementioned command.
Failure Logs
npm run lint api
> nx workspace-lint && nx lint "api"
> nx run api:lint
Cannot find module '@angular-devkit/build-angular/package.json'
Require stack:
- /Users/victor/Development/projects/healthy-intellect/hi/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /Users/victor/Development/projects/healthy-intellect/hi/node_modules/@angular-devkit/architect/node/index.js
- /Users/victor/Development/projects/healthy-intellect/hi/node_modules/@nrwl/tao/src/commands/run.js
- /Users/victor/Development/projects/healthy-intellect/hi/node_modules/@nrwl/tao/index.js
- /Users/victor/Development/projects/healthy-intellect/hi/node_modules/@nrwl/cli/lib/run-cli.js
Environment
@nrwl/angular : Not Found @nrwl/cli : 9.5.1 @nrwl/cypress : Not Found @nrwl/eslint-plugin-nx : 9.5.1 @nrwl/express : Not Found @nrwl/jest : 9.5.1 @nrwl/linter : 9.5.1 @nrwl/nest : 9.5.1 @nrwl/next : Not Found @nrwl/node : 9.5.1 @nrwl/react : Not Found @nrwl/schematics : Not Found @nrwl/tao : 9.5.1 @nrwl/web : Not Found @nrwl/workspace : 9.5.1 typescript : 3.8.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (2 by maintainers)
@bekos Tried out 10.3 and this fixed the issue.
@siberian-man thx for reporting, but I cannot reproduce the issue either 😕 I am going to close this now, as it is not actionable atm, but feel to to reopen if you have more info that will help us understand your case.