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.

`preact/debug` error only in v8.2.6

See original GitHub issue

After upgraded my project from preact@v8.2.5 to v8.2.6, I had this error when loading the page:

debug.js:49 Uncaught TypeError: Cannot set property render of #<Object> which has only a getter

// debug.js:L49
preact.render = function (vnode, parent, merge) {

If I stop requiring preact/debug it would be OK. I require it like this:

window['Promise'] = require('promise-polyfill')

if (process.env.ENV === 'production') {
  // Production
} else {
  // Development
  Error['stackTraceLimit'] = Infinity
  require('preact/debug')
}

When using v8.2.5 it was all good.

I’m using only preact with webpack@2 without preact-compat or any react related stuff.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:9
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
NekRcommented, Nov 21, 2017

I think there should be a way. I’ll take a look into that later this week.

1reaction
NekRcommented, Oct 28, 2017

@whitetrefoil you don’t have to guard preact/debug with process.env.NODE_ENV guard, it does so for you automatically. That’s why it’s better to use than preact/devtools.

Read more comments on GitHub >

github_iconTop Results From Across the Web

`preact/debug` error only in v8.2.6 · Issue #924 - GitHub
After upgraded my project from preact@v8.2.5 to v8.2.6, I had this error when loading the page: debug.js:49 Uncaught TypeError: Cannot set ...
Read more >
Debugging Preact Apps
Debug Warnings and Errors. Sometimes you'll may get warnings or errors whenever Preact detects invalid code. These should all be fixed to ensure...
Read more >
preact.umd.js.map - UNPKG
The check is needed so that\n\t// we can display a nice error message with our debug helpers\n\tif (type!=null && type.defaultProps!=null) {\n\t\tfor (let i ......
Read more >
Gatsby Changelog | 5.3.0
Common errors when doing swap to LMDB will be that some fields don't exist anymore or are null / undefined when trying to...
Read more >
TSConfig Reference - Docs on every TSConfig option
false raises compiler errors about unreachable code. These warnings are only about code which is provably unreachable due to the use of JavaScript...
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