Open Trisped opened 8 months ago
Hi, did you solve the issue? Check your import maps to ensure you are using the latest version of single-spa.
Hi, did you solve the issue? Check your import maps to ensure you are using the latest version of single-spa.
@MilanKovacic I was unable to confirm that the reported change is still required.
My related import maps are:
"react": "https://cdn.jsdelivr.net/npm/react@18.2.0/umd/react.production.min.js",
"react-dom": "https://cdn.jsdelivr.net/npm/react-dom@18.2.0/umd/react-dom.production.min.js",
"single-spa": "https://cdn.jsdelivr.net/npm/single-spa@6.0.1/lib/es2015/system/single-spa.min.js"
These are the only packages I have marked as external since they are the only ones I have full URLs for. I have not yet figured out how to import from a package.
something similar happened to me but I corrected it by removing ^ from the react and react-dom dependencies. As they released that new version of react 18.3.0 is giving conflicts if it detects several versions of react.
When I followed the single-spa-reactquick start instructions, it indicated that I should use)
at p (https://localhost:8080/new-app.js:12748:4017)
at https://cdn.jsdelivr.net/npm/single-spa@5.9.0/lib/system/single-spa.dev.js:303:33
import ReactDOMClient from "react-dom/client";
instead ofimport ReactDOM from "react-dom";
. When I make the change, I get a run time error: application '@new/app' died in status SKIP_BECAUSE_BROKEN: m.createRoot is not a function TypeError: application '@new/app' died in status SKIP_BECAUSE_BROKEN: m.createRoot is not a function at exports.createRoot (https://localhost:8080/new-app.js:5404:16) at u.elementToRender (https://localhost:8080/new-app.js:12748:5162) at https://localhost:8080/new-app.js:12748:5262 at new Promise (The URL at the end seems strange, since all my package.json indicates that single-spa 6.0.1 should be used:
The new-app.tsx file which creates the error:
The only thing I can think of is that the singleSpaReact method was changed to get the client from ReactDOM... I thought I should check here just in case.