dotnet-wasm-react icon indicating copy to clipboard operation
dotnet-wasm-react copied to clipboard

Uncaught TypeError

Open wandersonareis opened this issue 3 years ago • 3 comments

Uncaught TypeError: Cannot read properties of undefined (reading 'createElement')

return /#PURE/react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement("i", null, "Loading...");

Using npm start. Change tag or remove not resolve.

wandersonareis avatar Jan 10 '23 22:01 wandersonareis

Thanks for the report.

  • Is the same a #6?
  • Did you followed the steps to build all parts?
  • Can you provide a full stack trace?

maraf avatar Jan 11 '23 08:01 maraf

Maybe. If you remove the QR Image component, it works. When you call the QrImage component the undefined variable problem happens and nothing appears on the screen. I removed the dotnet wasm Generate call and the problem persists. I put in values manually and the same error of variabel undefined. I removed everything in the QrImage function, leaving a

tag, also this undefined happened.

wandersonareis avatar Jan 11 '23 18:01 wandersonareis

The errors seems different, but it is still npm start that has a problem with the two uses of webpack (lib & app). Removing QrImage component solves the problem you see because /#PURE/react__WEBPACK_IMPORTED_MODULE_0__["default"] won't be used any more.

I'm thinking why your error is different from the one everybody else sees in #6.

What version of webpack do you use?

maraf avatar Jan 12 '23 10:01 maraf