agarcia-caicedo / p5-gatsby-tutorial

This is a tutorial to show case how to integrate p5js with gatsbyjs
https://agarcia-caicedo.github.io/p5-gatsby-tutorial/
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Unhandled Runtime Error. One unhandled runtime error found in your files with loadable and react-p5-wrapper #1

Open owochel opened 2 years ago

owochel commented 2 years ago

Here's the error message I got.

Error in function hoistNonReactStatics in ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js:70 Cannot convert undefined or null to object

./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js:70 Open in Editor

68 | // don't hoist over string (html) components 69 | if (objectPrototype) { 70 | var inheritedComponent = getPrototypeOf(sourceComponent); 71 | 72 | if (inheritedComponent && inheritedComponent !== objectPrototype) { 73 | hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);

Here is my dependencies list: `{ "name": "gatsby-starter-hello-world",

"version": "0.1.0",

"lockfileVersion": 2,

"requires": true,

"packages": {

"": {

  "name": "gatsby-starter-hello-world",

  "version": "0.1.0",

  "license": "0BSD",

  "dependencies": {

    "@loadable/component": "^5.15.2",

    "gatsby": "^4.21.1",

    "hoist-non-react-statics": "^3.3.1",

    "p5": "^1.4.2",

    "react": "^18.1.0",

    "react-dom": "^18.1.0",

    "react-p5": "^1.3.30",

    "react-p5-wrapper": "^3.3.0"

  },

  "devDependencies": {

    "prettier": "^2.7.1"

  }

},`

I cannot think of why this is happening. I've also updated everything possible.

owochel commented 2 years ago

See this for solution!

https://github.com/armindocachada/gatsby-p5js/issues/1