Upgraded from Nx 10.1 to 10.4: Now getting "Could not find Nx modules in this workspace."
See original GitHub issueCurrent 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:
- Created 3 years ago
- Reactions:4
- Comments:24 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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:
On localhost I had @nwrl/cli installed locally.
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:
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.