question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cryptic error when using preact/compat

See original GitHub issue

I just tried to use preact/compat on my quite complex project. It was using Preact 8.x before, but when hooks came out we decided to temporarily move back to React. I basically just installed the new preact version and aliased it through webpack and then ran my app again. It partially renders and I’m afraid this might have something to do with the partial support for <Suspense />, but I’m getting this cryptic error:

Uncaught (in promise) TypeError: Cannot read property '__c' of null
    at Object.MOxe.preact__WEBPACK_IMPORTED_MODULE_0__.options.unmount (hooks.module.js:1)
    at D (preact.module.js:1)
    at r (compat.module.js:1)

For some reason source mapping also doesn’t work for me with preact/compat which makes it very hard to debug this by myself.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewigginscommented, Oct 21, 2019

I believe #2030 should fix this issue

1reaction
PepijnSenderscommented, Oct 3, 2019

Understood, it was already quite late so good that you brought it out anyways!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switching to Preact (from React)
Everything you need to know to switch from React to Preact.
Read more >
Has anyone run into issues with a vite SSR import error?
I'm trying to install the svelte-fullcalendar package in my app, but when I run it, I get the following cryptic error:
Read more >
Error using preact-compt Uncaught (in promise) ReferenceError
I want to use some React compatible packages in my preact app. I have followed the instructions for installing preact-compat.
Read more >
Cannot find module 'react/package.json' #17448 - Issuehunt
Storybook build fails in CI environment with error Error: Cannot find module ... "npm:@preact/compat", "react-ssr-prepass": "npm:preact-ssr-prepass" } ...
Read more >
Migrating from v2 to v3 - Gatsby
warning Plugin gatsby-plugin-acme is not compatible with your gatsby version 3.0.0 - It ... If you are using npm 7, the warning may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found