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.

Upgraded from Nx 10.1 to 10.4: Now getting "Could not find Nx modules in this workspace."

See original GitHub issue

Current Behavior

Since upgrading my Nx from version 10.1 to 10.4 just now, I can no longer start my project. It says, “NX ERROR Could not find Nx modules in this workspace.” Followed by, “Have you run npm/yarn install?”

Expected Behavior

I would expect my project to start. It starts fine on the older version.

Steps to Reproduce

Presumably, this would happen for anyone running a TypeScript React project upgrading to 10.4?

Environment

Oddly enough, even nx report is throwing the same error listed above.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:24 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
JakubPawlakcommented, Nov 18, 2021

I had the same problem after migration to nx@12.10.0 in CI. Before migration there were no problems neither in docker nor on localhost. After migration localhost was working without issues but the error was shown in docker before linting.

For me the solution was to add @nrwl/cli to dev dependencies:

npm i -D @nrwl/cli

On localhost I had @nwrl/cli installed locally.

7reactions
cratescommented, Nov 17, 2020

Another quick update: I was able to get past the error I posted just above.

Here’s what I ran most recently, in order to get past this error:

npm i -D @nrwl/cli
npm i -D @nrwl/angular
npx nx migrate --run-migrations=migrations.json

That seems to have allowed me to process the migrations file and update my Nx successfully to v10.3… With the exception, however, of the @nrwl/cli and @nrwl/angular packages, which are at 10.4 now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why am i getting error on using any `nx` commands
Just had this issue myself. Fixed it by deleting all my node_modules, verifying npm cache, updating my global @nrwl-cli, and reinstalling.
Read more >
could not find nx modules in this workspace - Hicksville News
I have an NX Workspace for angular. Presumably, this would happen for anyone running a TypeScript React project upgrading to 10.4?
Read more >
nrwl-nx/community - Gitter
I'm doing an "npm ci" on my code and I'm getting this error: Error: Cannot find module '@nrwl/workspace/src/command-line/supported-nx-commands' Require ...
Read more >
@nrwl/workspace NPM | npm.io
Does it replace Angular CLI? Nx is not a replacement for Angular CLI. An Nx workspace is an Angular CLI workspace. You run...
Read more >
Bug listing with status RESOLVED with resolution OBSOLETE ...
... ebuild does not support pci nor pcidev linux kernel module" status:RESOLVED ... Bug:101884 - "Get an ops message from the kernel with...
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