jhamlet / svg-react-loader

Webpack SVG to React Component Loader
MIT License
559 stars 82 forks source link

Build Errors on Netlify, but not locally. #137

Open avodynamics opened 3 years ago

avodynamics commented 3 years ago

I've been having issues where my Gatsby site won't build on netlify, but will locally. I've traced the issue to have something to do with SVGs, and this is the SVG loader that I'm using. Here is a link to the Repo: https://github.com/avodynamics/avodynamics.com

The error that I get on Netlify

10:34:27 AM: failed Building static HTML for pages - 0.270s
10:34:28 AM: error Building static HTML failed for path "/404/"
10:34:28 AM: 
10:34:28 AM:   261 |     if (!bodyHtml) {
10:34:28 AM:   262 |       try {
10:34:28 AM: > 263 |         bodyHtml = renderToString(bodyComponent)
10:34:28 AM:       |                    ^
10:34:28 AM:   264 |       } catch (e) {
10:34:28 AM:   265 |         // ignore @reach/router redirect errors
10:34:28 AM:   266 |         if (!isRedirect(e)) throw e
10:34:28 AM: 
10:34:28 AM:   WebpackError: Minified React error #65; visit https://reactjs.org/docs/error-d  ecoder.html?invariant=65&args[]=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2Cphn2zyb4bw  xucz0iahr0cdovl3d3dy53my5vcmcvmjawmc9zdmciihzpzxdcb3g9ijagmca0ny45osa0oci%2Bpg  rlznm%2Bphn0ewxlpi5mztfkzjg5ni1hmty0ltrizgqtywywzi04zmiwndhlowrmmzz7zmlsbdojn2  eymde2o30uyjqyotfmnzqtowi0oc00ytu2lwizmgytztzjztlkzmrhmwy3e2zpbgw6izbmnzg3yjt9  pc9zdhlszt48l2rlznm%2Bpgcgawq9imfinja2owm0lwe3zdmtngzmms04mgrlltbimjkwmwnjzjgw  nyigzgf0ys1uyw1lpsjmyxllciayij48zybpzd0izta3nwjjzdmtowfkmc00nmm4lwi3m2utmmu3nw  yxzwizngewiibkyxrhlw5hbwu9ilntywxsiexvz28ipjxwyxroignsyxnzpsjmztfkzjg5ni1hmty0  ltrizgqtywywzi04zmiwndhlowrmmzyiigq9ik00ns42ldezljy4ys4zmy4zmywwldasmswums4xny  wymy44mswymy44mswwldasms0umjismjauodnbmjmuotmsmjmuotmsmcwwldesmjgsndcunjzjls43  ms4xmi0xljqxljitmi4xmy4ynkeymy41niwymy41niwwldasmswymyw0ogexos40niwxos40niwwld  asms0yls4xnywymy41mywymy41mywwldasms00ljyxlteumdzbmjiundksmjiundksmcwwldesoc4y  nyw0mmezms4zmswzms4zmswwldasms0zljm1ltmunjvjls40ni0untgtljkxlteumtgtms4zns0xlj  c4ys4yns4ynswwldasmswwls4zyy43ny0xlju0ldeuntmtmy4xldiumjktnc42nxeylji0ltquntms  nc40oc05lja2bdmuntetny4xmxeyltqumtesnc4wni04ljiyyy40ms0uoduuodmtms42oswxlji1lt  iuntqsmcwwlc4wns0umdkumdktlje2tdmwljqsmjcumthhlje3lje3ldasmcwxls4xmiwwsdi2ljqy  ys4ymi4ymiwwldasms0umjitlje1bc00ljy1ltkunthjls43ns0xlju1lteuns0zljexltiumjytnc  42nmwtlja2ls4xmmmtlja2ldatlja3lja3ls4wos4xmuwxnswyms4znvexmi4znswyni43nyw5ljcy  ldmyljjdoc45ncwzmy43osw4lje3ldm1ljm5ldcumzksmzdhlji2lji2ldasmcwwldasljmxldixlj  i3ldixlji3ldasmcwwldewlje0lddbmtkunjgsmtkunjgsmcwwldasmjaunsw0nwmunjiumswxlji1  lje4ldeuodgumjnhmjeuntgsmjeuntgsmcwwldasmi4yny4wnkeyms4zmywyms4zmywwldasmcw0nc  4xmywzmc44ncwyms4wnswyms4wnswwldasmcw0ns4yncwymywyms42ocwyms42ocwwldasmcw0nc4w  nywxn2eumjgumjgsmcwwldesmc0umjvaii8%2Bphbhdgggy2xhc3m9imi0mjkxzjc0ltlindgtnge1  ni1imzbmlwu2y2u5zgzkytfmnyigzd0ittqzljkxldewljy1yy0uodutms0xljy4ltiumdytmi41ny  0zlja1ytiwljqsmjauncwwldasmc0yljuxltiundfbmjqsmjqsmcwwldasmjguntqundvjls42ls4x  mi0xljitljiylteuoc0umjlhni4znsw2ljm1ldasmcwwltetlja4ldiumtismi4xmiwwldasmc0unt  ysmeeuodeuodesmcwwldasmjusmgeunzcunzcsmcwwldatljmsmhetmswwltiumdcsmewyms41my4x  m2mtlju5lja2lteumtkumtqtms43oc4yns0undiumdgtljg0lje1lteumjuumjdhnc41nyw0lju3ld  asmcwwls45ljizljeyljeyldasmcwwls4xldbomgeunziunzismcwwldatlji1lja3ldiumtismi4x  miwwldasmc0umzyumswymi40mywymi40mywwldasmc00ljm3ldeuodzbljiyljiyldasmcwwldeylj  qsm2mtljuzljmtms4wns42mi0xlju2ljk1qti1ldi1ldasmcwwldguntgsns42mmeymy45mswymy45  mswwldasmc0yljqsmi4zmiwymi44miwymi44miwwldasmc0xljk0ldiundrbmjmuodqsmjmuodqsmc  wwldasmiwxnc41miwymy4yniwymy4yniwwldasmcwxlde3lja5ytiyljexldiyljexldasmcwwls41  niwylji3yzasljmzls4xmy42ns0umtysmxyumtfhlja2lja2ldasmcwwldaslja4bdaslje4czasmc  wwldbhms4xnswxlje1ldasmcwwldaslji2ldasmcwwldasmcwwldbbmtkuntismtkuntismcwwldas  mcwymy42owmwlc41miwwldesmcwxlju1ys4xmy4xmywwldasmcwwlc4xmiwxmi42nswxmi42nswwld  asmcwumtmsms41lje1lje1ldasmcwwldasljezbdaslji1ys4wni4wniwwldasmcwwlc4wns44mi44  miwwldasmcwwlc4ymmmumdguntmumtcsms4wni4yoswxlju5yti0ljusmjqunswwldasmcwxlji5ld  qumtfzmcwumteumdkumtqumdytljexlja4ls4xnmwxltiumddjlje4ls4zni4zny0unziuntmtms4x  lja1ldaslja1ls4wocwwls4xmmewldasmcwwldasmcwwldeunjysms42niwwldasmc0umtetljm4bd  atljexczasmcwwldbomgeuodiuodismcwwldatlja3ls4zldasmcwwldasmcwwldbwmjlhmjiumdks  mjiumdksmcwwldetljqyltiumjcsmtkumdksmtkumdksmcwwldetlje3ltiumtqsmjaumzysmjaumz  ysmcwwldeslje0ltnbmtkumdgsmtkumdgsmcwwldesmy4zmswxoweymc4xnswymc4xnswwldasmswx  ljitmy41niwymc45miwymc45miwwldasmswyljgzltqunjljljqtljuxljg0ltesms4yos0xljq4yt  izljyyldizljyyldasmcwxldeuotutms44yy4zos0umziunzktljyyldeumi0uotjzljy5ls40niwx  lja1ls42oge2lja4ldyumdgsmcwwldasljy0ls4zowwumjmtljeyytixlja2ldixlja2ldasmcwxld  itmswymc4zoswymc4zoswwldasmswzltesncw0ldasmcwwlc41os0umtzsljeyldbjljq3ls4xljk1  ls4xoswxljqzls4ynmeyms44nswyms44nswwldasmswzljeyls4yngguowwxljexlja4yte5ljqyld  e5ljqyldasmcwxldiumzkumzzbmjauodksmjauodksmcwwldesmzqunzksns43ytixljmzldixljmz  ldasmcwxldmuodqsmi45mwmundgunduuotiuotmsms4zniwxljqxys4xoc4xocwwldasmswwlc4yns  4woc4wocwwldasmcwwlc4wnxetmy42osw3ljyxltcumzysmtuumjfjls4xos4zoc0umzgunzutlju0  ldeumtromgmtlja1ldatlja2lja5ls4woc4xnc0unzysms41ns0xljuxldmumtetmi4yniw0ljy2ls  4yns41my0unswxlja2ls43niwxlju5bdaslja2yy0umzyunzqtljcxldeundgtms4wnywyljixys4y  nc4yncwwldasms0ums4xnwwtlja2ls4xmwmtljm5ls43oc0unzutms41ny0xlje2ltiumzqtlji0ls  40ni0undqtms0unjctms40my0untutms4xns0xljexltiumy0xljy3ltmundvslteunjktmy40ni0u  odqtms43nwmtlji5ls42ms0uni0xljizls44os0xljg0ldatlja4ls4woc0umtmtlje4ls4xm0gxny  4ynmmtljexldatlje0lja3ls4xny4xnc0untesms0xldiumdktms41miwzljezldasmc0umduumdcs  mcwumtjhljc0ljc0ldasmcwwlc4ymswwsde4ljfhlji2lji2ldasmcwxlc4yny4xn2mundeuoduuod  msms42oswxlji0ldiuntnxms4yocwylju4ldiuntysns4xnmmumtkumzkumzcunzguntgsms4xnmex  ljm3ldeumzcsmcwwldaslje2ljmyldmuodmsmy44mywwldasmcwumy42mswxldesmcwwldaslja3lj  e1bdeumtesmi4yniwzljmzldyunzvhljc1ljc1ldasmcwxlc4wny4xmmmumdysmcwumdctlja4lja5  ls4xmi4xoc0umzuumzmtljcxljutms4wni4wny0umtcumtctljmylji1ls40oc4zni0unziunzitms  40mywxlja2ltiumtuumtitlji2lji2ls41ms4zoc0unzdzljm5ls43os41oc0xlje4yzatlja1lja4  ls4xlja1ls4xny4xoc0umzqumzctljy3lju0ltfzljiyls40oc4znc0unzfjljmtlju4lju3lteumt  yuodytms43nc4yls4zos4zos0unzkuntktms4xohmuntitmswunzytms41n2mumdgtljiumi0umzku  my0untlxmi42ms01lji4lduumi0xmc41ogwumzutljy5tdqyljm5lde0bdeuntmtmy4xm0eumtgumt  gsmcwwldasndmuotesmtaunjvaii8%2Bpc9npjwvzz48l3n2zz4%3D for the full message or   use the non-minified dev environment for full errors and additional helpful w  arnings.
10:34:28 AM:   
10:34:28 AM:   - static-entry.js:263 
10:34:28 AM:     avodynamics/.cache/static-entry.js:263:20

I'm not sure what the issue could be, because I can't reproduce this issue outside of their build pipeline.

When I take the spaces out of that error message I get the following react minified error.

urre commented 2 years ago

Did you find a solution to this?

I get errors when building on Vercel also when using https://www.gatsbyjs.com/plugins/gatsby-plugin-react-svg/ that is based on this.