hoaiduyit / react-pannellum

46 stars 38 forks source link

got undefined error when building with gatsby #73

Closed AlexanderProd closed 2 years ago

AlexanderProd commented 2 years ago

When I want to build a gatsby project and have react-pannellum imported I always get the following error.

failed Building static HTML for pages - 1.068s

 ERROR #95313 

Building static HTML failed for path "/sanitaer/"

See our docs page for more info on this error: https://gatsby.dev/debug-html

  261 |     if (!bodyHtml) {
  262 |       try {
> 263 |         bodyHtml = renderToString(bodyComponent)
      |                    ^
  264 |       } catch (e) {
  265 |         // ignore @reach/router redirect errors
  266 |         if (!isRedirect(e)) throw e

  WebpackError: Minified React error #130; visit https://reactjs.org/docs/error-decoder.html?invariant=130&args[]=undefined&args[]= for th
  e full message or use the non-minified dev environment for full errors and additional helpful warnings.

This is the unminified React error message.

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

AlexanderProd commented 2 years ago

I mixed up react-pannellum and pannellum-react