pngwn / svelte-adapter

Use Svelte components with Vue and React
300 stars 11 forks source link

Error while running the example #15

Open SuPythony opened 3 years ago

SuPythony commented 3 years ago

Hi,

I copied the code in the example provided in the README and tried to run the app on my local machine. It is successfully compiled but there are errors in the console. I am using svelte-adapter with React.

Here they are -

Uncaught TypeError: Component is not a constructor
    at react.js:12
    at invokePassiveEffectCreate (react-dom.development.js:23487)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
    at invokeGuardedCallback (react-dom.development.js:4056)
    at flushPassiveEffectsImpl (react-dom.development.js:23574)
    at unstable_runWithPriority (scheduler.development.js:468)
    at runWithPriority$1 (react-dom.development.js:11276)
    at flushPassiveEffects (react-dom.development.js:23447)
    at react-dom.development.js:23324
    at workLoop (scheduler.development.js:417)
    at flushWork (scheduler.development.js:390)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:157)
The above error occurred in one of your React components:

    at http://localhost:3000/static/js/vendors~main.chunk.js:36091:73
    at div
    at App (http://localhost:3000/static/js/main.chunk.js:59:83)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
Uncaught TypeError: Component is not a constructor
    at react.js:12
    at invokePassiveEffectCreate (react-dom.development.js:23487)
    at HTMLUnknownElement.callCallback (react-dom.development.js:3945)
    at Object.invokeGuardedCallbackDev (react-dom.development.js:3994)
    at invokeGuardedCallback (react-dom.development.js:4056)
    at flushPassiveEffectsImpl (react-dom.development.js:23574)
    at unstable_runWithPriority (scheduler.development.js:468)
    at runWithPriority$1 (react-dom.development.js:11276)
    at flushPassiveEffects (react-dom.development.js:23447)
    at react-dom.development.js:23324
    at workLoop (scheduler.development.js:417)
    at flushWork (scheduler.development.js:390)
    at MessagePort.performWorkUntilDeadline (scheduler.development.js:157)
pngwn commented 3 years ago

I'll take a look at this, I haven't run the example code in a little while so it is possible that some dependencies may have changed. I am using this successfully in a few projects though, so it does work in general.

elron commented 2 years ago

I have the same error