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.

It is possible to use Hypernova with Preact?

See original GitHub issue

Hello. I’m trying to use Hypernova with Preact, but getting following error:

Development Warning! The 0 component failed to render with Hypernova. Error stack:
Error: Cannot find module 'react'
    at Function.Module._resolveFilename (module.js:470:15)
    at Function.Module._load (module.js:418:25)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/app/javascript/components/application/login.js:1:1)
    at Module._compile (module.js:571:32)
    at loader (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:144:5)
    at Object.require.extensions.(anonymous function) [as .js] (/usr/local/lib/node_modules/babel-cli/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at getComponent (/mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/config/hypernova.server.js:7:12)
    at BatchManager.render (/mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/node_modules/hypernova/lib/utils/BatchManager.js:170:22)
    at /mnt/c85468c5-7b6f-4c14-9ba0-b42dccaed6bc/commercial/cscp/node_modules/hypernova/lib/utils/lifecycle.js:170:22

I’m also trying to add this lines to my webpack config but it didn’t give any result:

    alias: {
      'react': 'preact-compat',
      'react-dom': 'preact-compat'
    }

Any clues on that?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
marconi1992commented, Nov 12, 2019

@tanraya you can take a look at this bindings for Preact. https://www.npmjs.com/package/hypernova-preact

0reactions
ljharbcommented, Nov 12, 2019

Closing, since the package now exists.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switching to Preact (from React)
Switching to Preact can be as easy as installing and aliasing preact-compat in for react and react-dom . This lets you continue writing...
Read more >
дэн on Twitter: "@pspeter3 @marvinhagemeist @preactjs ...
Another thing to consider is that AFAIK most people use Preact in the compat mode — which has worse runtime characteristics even than...
Read more >
React Server Side Rendering with Hypernova - Blog
But you begin to wonder, how can I improve performance on the client? The answer, of course, is Server Side Rendering!
Read more >
Nova Preact · Ara Framework
Preact bindings for Hypernova. Install package. npm install hypernova-preact ... Integrate it in your website using Nova Proxy, see details on page Render ......
Read more >
Mobius: Adopting JSX While Prioritizing User Experience - Etsy
Given all this, being able to use JSX components everywhere in our ... It felt like a risk to rely on the developers...
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