bennymeg / nx-electron

Electron schematics for nrwl nx platform
Apache License 2.0
333 stars 85 forks source link

Error running the electron application #133

Closed oussamarouabah closed 2 years ago

oussamarouabah commented 2 years ago

Steps to reproduce the behavior:

  1. Create the nx workspace npx create-nx-workspace@latest
  2. Add the necessary plugins
    1. npm i -D @nrwl/react
    2. npm i -D nx-electron
  3. Create apps
    1. ng g @nrwl/react:application
    2. nx g nx-electron:application
  4. Run the application using this command nx run-many --target=serve --projects=school,school-desk --parallel

Expected behavior Run the desktop app

System :

Error Trying to run the electron app using this command nx run-many --target=serve --projects=school,school-desk --parallel and got the following error.

nx run-many --target=serve --projects=school,school-desk --parallel

NX Running target serve for 2 project(s):

———————————————————————————————————————————————

nx run school:serve

nx run school-desk:serve Cannot find module '@nrwl/workspace/src/utils/buildable-libs-utils' Require stack:

  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/nx-electron/src/builders/build/build.impl.js
  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/@angular-devkit/architect/node/node-modules-architect-host.js
  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/@angular-devkit/architect/node/index.js
  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/@nrwl/tao/src/commands/ngcli-adapter.js
  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/@nrwl/tao/src/commands/run.js
  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/@nrwl/tao/index.js
  • /home/oussama/workspace/work/softbrew/school/softbrew/node_modules/@nrwl/cli/lib/run-cli.js [webpack-dev-server] Project is running at: [webpack-dev-server] Loopback: http://localhost:4200/, http://127.0.0.1:4200/ [webpack-dev-server] 404s will fallback to '/index.html'

    NX Web Development Server is listening at http://localhost:4200/

Entrypoint main [big] 1.62 MiB (1.89 MiB) = runtime.js 50 KiB vendor.js 1.51 MiB main.js 61.8 KiB 3 auxiliary assets Entrypoint polyfills [big] 746 KiB (907 KiB) = runtime.js 50 KiB polyfills.js 696 KiB 2 auxiliary assets Entrypoint styles [big] 430 KiB (534 KiB) = runtime.js 50 KiB styles.css 399 bytes styles.js 380 KiB 2 auxiliary assets chunk (runtime: runtime) main.js (main) 52.3 KiB [initial] [rendered] chunk (runtime: runtime) polyfills.js (polyfills) 651 KiB [initial] [rendered] chunk (runtime: runtime) runtime.js (runtime) 33.7 KiB [entry] [rendered] chunk (runtime: runtime) styles.css, styles.js (styles) 363 KiB (javascript) 398 bytes (css/mini-extract) [initial] [rendered] chunk (runtime: runtime) vendor.js (vendor) (id hint: vendor) 1.48 MiB [initial] [rendered] split chunk (cache group: vendor) (name: vendor) webpack compiled successfully (af40565a0bcb454e) No issues found.

bennymeg commented 2 years ago

Miss-matched versions. Please use nx@11 with nx-electron@11.