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.

An unhandled exception occurred: Cannot find module 'nx/src/config/workspaces' since v14.0.1

See original GitHub issue

Description and reproduction of the issue

See https://github.com/jnizet/decouvertes-nature/pull/284:

  • checkout the branch of the PR (renovate/angular-eslint-monorepo)
  • run yarn
  • run yarn lint

It passed with version 14.0.0. With version 14.0.1, it fails with the following error:

An unhandled exception occurred: Cannot find module 'nx/src/config/workspaces'
Require stack:
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@nrwl/devkit/index.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular-eslint/builder/dist/compat.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular-devkit/architect/node/index.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular/cli/src/command-builder/architect-base-command-module.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular/cli/src/command-builder/architect-command-module.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular/cli/src/commands/build/cli.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular/cli/src/command-builder/command-runner.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular/cli/lib/cli/index.js
- /home/runner/work/decouvertes-nature/decouvertes-nature/node_modules/@angular/cli/lib/init.js

Versions

package version
@angular-eslint/builder 14.0.1
ESLint 8.19.0
node 14.19.3
# Please run `npx ng version` in your project and paste the full output here:

Angular CLI: 14.0.5
Node: 14.19.3
Package Manager: yarn 1.22.19 
OS: darwin x64

Angular: 14.0.5
... animations, cli, common, compiler, compiler-cli, core, forms
... localize, platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1400.5
@angular-devkit/build-angular   14.0.5
@angular-devkit/core            14.0.5
@angular-devkit/schematics      14.0.5
@angular/fire                   7.4.1
@schematics/angular             14.0.5
rxjs                            7.5.5
typescript                      4.7.4
  • I have updated to the latest supported version of the packages and checked my ng version output per the instructions given here.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:3
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hardmaster92commented, Jul 9, 2022

I confirm the same issue using NPM after updating to version 14.0.1

0reactions
elcreatorcommented, Sep 12, 2022

nx dependency itself causes problem with the eslint-builder crashing if some libraries have conflicting version dependencies.

Read more comments on GitHub >

github_iconTop Results From Across the Web

An unhandled exception occurred: Cannot find module '@ ...
Their error says there are missing dependencies or in other words node modules are not there. Solution: npm install NOTE: do this in...
Read more >
cannot find module '@schematics/angular/utility
Package successfully installed. An unhandled exception occurred: Cannot find module '@schematics/angular/utility' Require stack: myproject/ .
Read more >
Error: Cannot find module '/opt/render/project/src/app.js'
The error shows it's trying to connect to 127.0.0.1:27017 which is incorrect, you'll need to ensure your code is reading from the environment ......
Read more >
12.03, Cannot find module '@angular-devkit/build-optimizer'?
after update 12.02 -> 12.03, Cannot find module '@angular-devkit/build-optimizer'? ... $ ng test An unhandled exception occurred: Cannot find ...
Read more >
Google Groups
Error : Cannot find module '. ... First few programs ran fine but after I tried to include the 'router' module, it started...
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