nx-electron: unable to use nx-electron in nx 15.3

postinstall crashes after upgrading to nx 15.3 after upgrading nx framework to 15.3, it seems the postinstall breaks nx-electron:

To Reproduce Steps to reproduce the behavior:

  1. nx migrate latest
  2. npm i
  3. postinstall throws the following error:
warning "nx-electron > rxjs-for-await@1.0.0" has unmet peer dependency "rxjs@^7.0.0".
[4/4] Building fresh packages...
[1/3] ⠈ nx
[2/3] ⠈ nx
error E:\StreamOverlayPro-dev\StreamOverlayPro-NX\streamoverlaypro\node_modules\nx-electron\node_modules\nx: Command failed.
Exit code: 1
Command: node ./bin/init
Arguments:
Directory: E:\StreamOverlayPro-dev\StreamOverlayPro-NX\streamoverlaypro\node_modules\nx-electron\node_modules\nx
Output:

$

I have tried to determine the source of the issue. still very preliminary.

Expected behavior Build should exit successfully

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10, node 16.18.1
  • Nx Electron Version: 13.2.1
  • Nx Framework: 15.3

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 28 (6 by maintainers)

Most upvoted comments

I have released a beta few days ago, if all goes well and no one will report an issue I will release a stable version in a couple of days. I will try to release alpha for v15 quickly, but it will take a bit to release a stable v15. it seems Nrwl have done a lot of changes under the hood again.

@mtrefzer I’ve published an alpha.

Not closed here. still working on it.

I couldn’t have enough time for this @mtrefzer , I will keep in touch @bennymeg to see if we can move from the stable branch of 14 to move into 15.

@tbogard Thank you for working on the unit tests. The release cycle of NX is quite short, and I do not have a lot of time to develop the package every week. Hence, the slow releases. If you wish to work on v14 / v15 or adding new features, I would be more than happy to merge your PR’s. I am keeping developing and improving the package and hopefully release a new version (14) soon.

@bennymeg I migrated my clients project with the alpha and everything worked. I just used the most recent electron version and added some overrides due to some vulnerabilities (Severity: high).

Here are the relevant parts of the package.json

{
  "engines": {
    "node": "18.15.0",
    "npm": "9.5.0"
  },
  "devDependencies": {
    "electron": "^24.0.0"
  },
  "overrides": {
    "electron-builder": "^24.2.0",
    "webpack": "^5.78.0"
  }
}

Some updates. NOT CLOSED.

  1. Tests are failing on most of the schematics on WINDOWS. It should be transparent the test on mac/Linux/windows if the paths involved in the test are properly using path.join/path.resolve rather than a string. Tests show quite different things.
  2. once I fix the tests, I will attempt to resolve the build using Nx 15.4.

Note: if you are using Nx 14.3, be aware that breaking changes will happen and probably I will add a required version of Nx to prevent breaking changes on version 14. Keep in mind that if @bennymeg doesn’t update Nx Electron to Nx 15.4, I would eventually think on do it myself in a separate branch.