Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nx g nx-electron:app is looking for an angular.json configuration file in a react project #166

Closed
ainvoner opened this issue May 17, 2022 · 3 comments

Comments

@ainvoner
Copy link

ainvoner commented May 17, 2022

Describe the bug
nx g nx-electron:app <electron-app-name> --frontendProject=<frontend-app-name> command is looking for a configuration in /angular.json file while running in a nx/react project configuration.

To Reproduce
Steps to reproduce the behavior:
follow README instructions in a clean project:

  1. run npx create-nx-workspace@13
  • choose a react project with emotion styles
  1. run npm install -D nx-electron
  2. runnx g nx-electron:app <electron-app-name> --frontendProject=<frontend-app-name>
  • this will result an error which already defined here issue 146
  • issue resolved after adding those missing modules
  • once fixing the above issues a new error is prompt:
    Error: Cannot find configuration for 'app-client' in /angular.json. at readProjectConfiguration (/Users/me/Documents/GitHub/my-project/node_modules/nx/src/generators/utils/project-configuration.js:154:15) at addProxy (/Users/me/Documents/GitHub/my-project/node_modules/nx-electron/src/generators/nx-electron/generator.js:100:65) at /Users/me/Documents/GitHub/my-project/node_modules/nx-electron/src/generators/nx-electron/generator.js:168:13 at Generator.next (<anonymous>) at fulfilled (/Users/me/Documents/GitHub/my-project/node_modules/tslib/tslib.js:115:62) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) Cannot find configuration for 'app-client' in /angular.json.

Expected behavior
project configuration should be found in my-app/project.json and not in my-app/angular.json file

Desktop (please complete the following information):

  • OS: MacOS Monterey
  • Nx Electron Version 13.1.0

Additional context
Thanks!!!

@bennymeg
Copy link
Owner

Thank you for the elaborate report.

  • I thought issue 146 was fixed, did you remember if the requested packages was installed when the error appeared?
  • readProjectConfiguration() is part of the nx devkit, so I suspect it might be an issue with nx.
    could you try creating an @nrwl/node app and see if the error exist as well?

@bennymeg
Copy link
Owner

Fixed the first issue on v13.1.1.

@midsorbet
Copy link

had to install @angular-devkit/core and @angular-devkit/schematics on nx-electron@14.0.2 to make it work with my react application

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants