question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fails to lint library

See original GitHub issue

Current 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:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
michael-letchercommented, Oct 7, 2020

@bekos Tried out 10.3 and this fixed the issue.

1reaction
bekoscommented, Sep 14, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

lint-staged - npm
Lint files staged by git. Latest version: 13.1.0, last published: 21 days ago. Start using lint-staged in your project by running `npm i ......
Read more >
Pod lib lint fails for xcframework - ios - Stack Overflow
and pod lib lint returns me an error: Unable to find matching .xcframework slice in '../../../../../../../../Users/ ...
Read more >
Lint error: package fragment is not found for module ...
AGP: 4.0.0 Kotlin: 1.3.72 JVM: from docker image: 8u252-jdk-slim. Failure happens in CI builds, which always are clean. Failures are random.
Read more >
In Kotlin 1.6.0, Android Lint fails to resolve dependencies ...
0, the Kotlin Gradle plugin tunes dependency resolution in Android classpath configurations setting org.gradle.category=library , which prevents Android Lint ...
Read more >
Common React TypeScript ESLint / Lint Errors & Warning ...
However, that will cause a lint error as it contradicts the whole idea of TS checking the type of the object. With a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found