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

Creating multiple back end applications throws error Path "/apps/X/proxy.conf.json" already exist. #4215

Closed
davecranwell-vocovo opened this issue Dec 7, 2020 · 5 comments · Fixed by #4474
Labels
outdated scope: react Issues related to React support for Nx type: bug

Comments

@davecranwell-vocovo
Copy link

davecranwell-vocovo commented Dec 7, 2020

Current Behavior

If I create a React app, then an express app with --frontendProject=myreactapp. I see a proxy.conf.json created in the React app codebase.

If I then add a second express app, also with the same frontendProject, I get the error
Path "/apps/myreactapp/proxy.conf.json" already exist. and the generator appears to bail: no further files are created or changed.

I have to wonder if I'm doing something fundamentally wrong by having 2 APIs, but this can't be that unusual in a microservices environment.

I've tried using --force but it still complains. Ideally it shouldn't have to use force though as multiple apis doesn't seem outlandish.

Expected Behavior

I'd expect the second app to be appended to the object in proxy.conf.json.

Steps to Reproduce

  1. Create brand new NX project
  2. Add React front end
  3. Add Express backend, linked to front end
  4. Add second Express backend, linked to front end

Environment

OSX Catalina
Node 12.16.2
@nrwl/workspace 10.4.4

@mehrad-rafigh
Copy link
Contributor

I can reproduce this as well, when I adjust the test. I will take a look at this and open a PR

@vsavkin vsavkin added the scope: react Issues related to React support for Nx label Jan 4, 2021
@bekos
Copy link
Contributor

bekos commented Jan 7, 2021

@mehrad-rafigh do you still want to send a PR? 😃

@mehrad-rafigh
Copy link
Contributor

@bekos sry I forgot about this. I will finish the PR tonight

@mehrad-rafigh
Copy link
Contributor

@bekos I opened a PR. Could you please review it?

@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: react Issues related to React support for Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants