_Please make sure you have read the submission guidelines before posting an issue_
Please answer the following questions for yourself before submitting an issue.
YOU MAY DELETE THE PREREQUISITES SECTION.
"@nrwl/workspace": "8.8.0",Nx can work in a monorepo with both @nrwl/angular and @nrwl/react.
Hopefully this is a valid use case for Nx.
Adding a react app into an existing workspace (there's already an angular app), the react app cannot be started
What is the current behavior?
As above.
Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.
Please provide detailed steps for reproducing the issue.
create workspace:
yarn create nx-workspace --preset=empty myworkspace
generate an angular app first:
yarn add --dev @nrwl/angular && yarn ng g @nrwl/angular:app myapp1
this app can be started when running yarn start
generate another react app:
yarn add -D @nrwl/react && yarn nx g @nrwl/react:app myapp2
this react app cannot be started when running yarn start myapp2, there were a lot of errors about core-js thrown in polyfills.ts:
ERROR in ./polyfills.ts
Module not found: Error: Can't resolve 'core-js/modules/es.array-buffer.constructor'
checked that it's actually from:
import 'core-js/stable'; // this is actually since v3 only
and the version for core-js in package.json: "core-js": "^2.5.4",
Please provide any relevant information about your setup:
nx report at the root of your workspace and copy the results here if you are using Nx 8.6.1 or greater_) 8.8.0As above
Any other relevant information that will help us help you.
In my case, there's a quick workaround though:
because core-js is mainly used in polyfills.ts in angular app (still an empty app), which did not import yet any modules, I can simply change the core-js version in package.json to v3+
Thank you for your report, it is something that is on our radar and will be fixed soon :)
@royling This will be patched in the upcoming release. And yes, you can force core-js to be version 3 in your package.json for now. With the patch it wouldn't matter which core-js version your workspace has, we'll always point to the one needed by web builder.