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-cloud is at 15.0.2 (latest), but nx-cloud is throwing an error when using @nrwl/* packages at 15.2.0

See original GitHub issue

Current Behavior

In CI we use

$ npx nx-cloud stop-all-agents

In order to stop agents when CI is cancelled/skipped in a way that the main workflow would miss. This was working fine last week, but then we noticed as of today nx-cloud is throwing the following error:

This version of Nx Cloud is incompatible with the @nrwl/* packages in your workspace.

Match your @nrwl/nx-cloud version to the same major version of your @nrwl/* packages and try again.

Expected Behavior

npx nx-cloud when using the latest version published shouldn’t cause any problems when using the latest version of the core tools.

Github Repo

No response

Steps to Reproduce

  1. Update your workspace to latest 15.2.0 @nrwl/* packages
  2. Run npx nx-cloud stop-all-agents
  3. Notice the unexpected error telling you to try again.

Nx Report

Node : 18.11.0
   OS   : darwin arm64
   yarn : 1.22.19
   
   nx : 15.2.0
   @nrwl/angular : Not Found
   @nrwl/cypress : 15.2.0
   @nrwl/detox : Not Found
   @nrwl/devkit : 15.2.0
   @nrwl/esbuild : Not Found
   @nrwl/eslint-plugin-nx : 15.2.0
   @nrwl/expo : Not Found
   @nrwl/express : 15.2.0
   @nrwl/jest : 15.2.0
   @nrwl/js : 15.2.0
   @nrwl/linter : 15.2.0
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : 15.2.0
   @nrwl/nx-cloud : 15.0.2   <--- Notice!!
   @nrwl/nx-plugin : 15.2.0
   @nrwl/react : Not Found
   @nrwl/react-native : Not Found
   @nrwl/rollup : 15.2.0
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : 15.2.0
   @nrwl/webpack : 15.2.0
   @nrwl/workspace : 15.2.0
   typescript : 4.9.3
   ---------------------------------------
   Local workspace plugins:
         @hca/package-generator
   ---------------------------------------
   Community plugins:

Failure Logs

2022-11-21T23:50:35.6803133Z ##[group]Run npx nx-cloud stop-all-agents
2022-11-21T23:50:35.6803439Z npx nx-cloud stop-all-agents
2022-11-21T23:50:35.6856819Z shell: /usr/bin/bash -e {0}
2022-11-21T23:50:35.6857034Z env:
2022-11-21T23:50:35.6857388Z   GITHUB_TOKEN: ***
2022-11-21T23:50:35.6857589Z ##[endgroup]
2022-11-21T23:50:36.5611327Z npm WARN exec The following package was not found and will be installed: nx-cloud@15.0.2
2022-11-21T23:50:37.3190435Z NX CLOUD ERROR
2022-11-21T23:50:37.3194595Z ---------------------------------------
2022-11-21T23:50:37.3195317Z This version of Nx Cloud is incompatible with the @nrwl/* packages in your workspace.
2022-11-21T23:50:37.3195829Z 
2022-11-21T23:50:37.3196639Z Match your @nrwl/nx-cloud version to the same major version of your @nrwl/* packages and try again.

Additional Information

No response

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fbarthocommented, Nov 22, 2022

Okay thanks for the info @StalkAltan, please consider this a ticket requesting at least one of those paths:

  1. improve the error message when executing nx-cloud with a missing node_modules / in isolation
  2. a) document npx nx-cloud to still need yarn install
  3. b) improve nx-cloud stop-all-agents to not need a full yarn install

Feel free to close this ticket if those are filed elsewhere!

0reactions
StalkAltancommented, Nov 22, 2022

The lack of node_modules would be your problem here.

Even though we recommend invoking nx-cloud with npx, it’s not because the package is able to run in isolation (though some commands might work). It’s more because node_modules caching is notoriously flaky, and using npx ensures that the bin directory alias for nx-cloud from the @nrwl/nx-cloud package works.

Although stop-all-agents could probably be made to run in isolation, I don’t see that happening with much urgency, since it could cause confusion when people want to use other commands from the package that do rely on a full Nx install existing (ex. nx-cloud record or nx-cloud upload-and-show-run-details).

Apologies for the inconvenience here. Like I mentioned, we could definitely improve the messaging here so the error makes you aware that we require the full install to be available.

Let me know if you have any other questions!

Read more comments on GitHub >

github_iconTop Results From Across the Web

With Nx 15.2.x using Karma for @nrwl/angular is broken #13291
Current Behavior While updating our Ionic Angular package, we found a problem with Karma (not sure how important that is these days). This...
Read more >
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 >
Fix unable to install update an error occurred installing ios 15.2
But in future 2022,this apple team may be fix this kind of error ... this same issue while they try to updating their...
Read more >
Emit attempted before Angular Webpack plugin initialization ...
Nov 28, 2022 ... js/divdrawer/filterMappingRemover.ts Module build failed (from ./node_modules/@ngtools/webpack/src/index.js): Error: Emit attempted ...
Read more >
Pulse · nrwl/nx · GitHub
73 Unresolved conversations. Sometimes conversations happen on old items that aren't yet closed. Here is a list of all the Issues and Pull...
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