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.

10.0.0-alpha.2 - Hooks - Uncaught TypeError: Cannot read property 'render' of undefined

See original GitHub issue

Using hooks like this.

import {useState} from 'preact/hooks';

getting this error

hooks.mjs:1 
Uncaught TypeError: Cannot read property 'render' of undefined
    at Module../node_modules/preact/hooks/dist/hooks.mjs (hooks.mjs:1)
    at __webpack_require__ (bootstrap:63)
    at Module../src/index.js (index.js:2)
    at __webpack_require__ (bootstrap:63)
    at Object.2 (rx-preact-app.bundle.js:20462)
    at __webpack_require__ (bootstrap:63)
    at bootstrap:195
    at bootstrap:195

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
marvinhagemeistercommented, Apr 2, 2019

That’s the plan 🎉 Already prepared the release notes yesterday and the next alpha should go out in ~15 h.

1reaction
marvinhagemeistercommented, Mar 19, 2019

@didymu5 yeah with Myles finally fixing the module mess in node it seems like the mjs situation will be settled not too far in the future. We somewhat track it in #1321 although the issue title admittedly doesn’t really make that obvious.

EDIT: There you go #1425 🎉

Read more comments on GitHub >

github_iconTop Results From Across the Web

10.0.0-alpha.2 - Hooks - Uncaught TypeError: Cannot ... - GitHub
hooks.mjs:1 Uncaught TypeError: Cannot read property 'render' of undefined at Module../node_modules/preact/hooks/dist/hooks.mjs ...
Read more >
Cannot read property 'render' of undefined - Stack Overflow
Every time i tried to include a react-component, the error Cannot read property 'render' of undefined appeared in the console, ...
Read more >
cannot read properties of undefined (reading '__h') - You.com
Describe the bug I'm getting TypeError: Cannot read properties of undefined (reading '__H') error on test environment when rendering a component which uses...
Read more >
Changelog - Cypress Documentation
Cypress no longer throws the error "cannot read property split of undefined" in certain circumstances when application errors are thrown. Fixes #17378.
Read more >
Bug List
493580, Orion, JS Tools, orion.client-inbox, CLOS, WONT ... CLOS, WONT, TypeError: Cannot read property 'replace' of undefined (in explorer.js), 2017-01-10.
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