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

Unhandled Rejection (Error): Dynamic root components have not been enabled in this application. #377

Open
frankrem opened this issue Apr 13, 2024 · 0 comments

Comments

@frankrem
Copy link

frankrem commented Apr 13, 2024

Reproduce on MacOS

cd samples/aspnetcore/blazor/JSComponentGeneration/JSComponentGeneration.Build
dotnet build
cd ../BlazorAppGeneratingJSComponents
dotnet watch

From another prompt:

cd samples/aspnetcore/blazor/JSComponentGeneration/react-app-with-blazor
export NODE_OPTIONS=--openssl-legacy-provider
npm run start

Browse to http://localhost:3000 and click button Add Blazor counter.

The browser displays: Unhandled Rejection (Error): Dynamic root components have not been enabled in this application..

The offending code seems to be in react-app-with-blazor/src/blazor-react.js on line 32:

return Blazor.rootComponents.add(parentElement, `${identifier}-react`, props);
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

1 participant