hupe1980 / gatsby-plugin-material-ui

Gatsby plugin for Material-UI with built-in server-side rendering support
MIT License
136 stars 24 forks source link

Error onPreBootstrap lifecycle #62

Closed janvarsa closed 3 years ago

janvarsa commented 3 years ago

I recently started getting the error below when I run "gatsby develop", although the build step completes successfully afterwards (unsure if this will break a Netlify deploy however):

ERROR #11321 PLUGIN

"gatsby-plugin-material-ui" threw an error while running the onPreBootstrap lifecycle:

The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received null

  39 |   }
  40 |
> 41 |   fs.writeFileSync(dir + "/styles-provider-props.js", module);
     |      ^
  42 | };

File: node_modules\gatsby-plugin-material-ui\gatsby-node.js:41:6
andrewnoyes commented 3 years ago

@janvarsa What version of the plugin are you using? We ran into this same issue, and upgrading to the latest version of the plugin fixed it for us. Pretty sure this is the relevant commit.

megane42 commented 3 years ago

I had used v2.1.6 and after upgrading to v2.1.10 the issue was fixed. Thank you so much 💯💯💯