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.

Nx can't find any projects in our repository from the 15.0.11 release

See original GitHub issue

Hello 👋

Current Behavior

We have a repository that uses Nx and our setup is set as follows:

/package-a
  package.json
/package-b
  package.json
/directory
package.json
nx.json

The root package.json does not have a workspace entry, we do not use npm workspace.

Since the release of 15.0.11, nx graph can’t find any projects.

The error message from the nx print-affected command:

NX   Nx could not find any projects. Check if you need to configure workspaces in package.json or pnpm-workspace.yaml

Expected Behavior

Before that release, Nx can find our projects: package-a and package-b.

According to the error message, it looks like we have to use workspace now but I didn’t find any documentation that push in that direction (but maybe I missed something).

Environment

nx report

 >  NX   Report complete - copy this into the issue template

   Node : 16.13.2
   OS   : darwin x64
   npm  : 8.1.2
   
   nx : 15.0.12
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 14.5.8
   @nrwl/esbuild : Not Found
   @nrwl/eslint-plugin-nx : Not Found
   @nrwl/expo : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 14.5.8
   @nrwl/js : Not Found
   @nrwl/linter : 14.5.8
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : Not Found
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/rollup : Not Found
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/webpack : Not Found
   @nrwl/workspace : 14.5.8
   typescript : 4.8.4
   ---------------------------------------
   Local workspace plugins:
   ---------------------------------------
   Community plugins:

Thanks 🙏

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
FrozenPandazcommented, Nov 16, 2022

Yes, a new plugin is available: nx/plugins/package-json. You can add it by adding this to nx.json:

  "plugins": [
    "nx/plugins/package-json"
  ]

What this plugin does is that it will re-enable the behavior prior to 15.0.11 find all package.json files as projects even without npm/yarn workspaces. After adding that to your workspace, the projects that showed up before should show up. Let me know if you have any issues.

Sorry for the delay. This will be documented shortly.

0reactions
Will956commented, Nov 21, 2022

Thanks @FrozenPandaz, works like a charm ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

fix(core): provide a plugin which to allow users to opt into ...
There is a nx/plugins/package-json plugin which will find all package.json projects even without npm workspaces setup.
Read more >
What's new in Nx 15?. Nx v15 is finally here! Let's go… - Nx Blog
Monorepos typically do not just have dependencies among projects but also among tasks. Let's say you have a Remix app that depends on...
Read more >
Affected - Nx
As your workspace grows, retesting all projects becomes too slow. To address this Nx implements code change analysis to get the min set...
Read more >
Reduce repository size - GitLab Docs
This project export contains a backup copy of your repository and refs we can use ... from tagged releases, force push your changes...
Read more >
The Git experience in Visual Studio - Version Control
To get started using Git with Visual Studio: If you have a Git repo hosted on a Git provider like GitHub, clone the...
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