Closed tylerscave closed 4 months ago
Update: I reached out to Builder.io and it seems their their Gen2 SDK should solve this... I'm in the process of updating/upgrading our project and will close this thread if its successful.
Hey, any luck with this?
This was resolved by upgrading to the Builder Gen2 SDK --> Closing issue...
When updating to use the new vite dev server (this PR), I was able to get everything working on the majority of our site, but ran into an issue with an installed npm package with a dependency on
emotion
.Some of the pages on our site are created in Builder io (our CMS/site-builder). Our installed
"@builder.io/react": "^3.2.6"
package has a dependency on@emotion/core
, which doesn't seem to be playing nicely with the newvite
configuration.The builder pages work as expected when using site navigation, but going to a URL directly, or doing a page refresh causes the following 500 error:
This is caused due to a null
cache
object in theemotion
file...I understand this may be an issue with the
@builder.io/react
package and that I may need to file an issue with them, but I wanted to file it here in case I'm missing some vite configuration (I'm not a vite wizard just yet 😅).Something else that might be related, are the number of dependencies I needed to add to our
optimizeDeps
in ourvite.config
. Understandably, our project has quite a few libraries installed, but I ran into a lot of issues withReferenceError: module is not defined
for things in the dependency tree (maybe this is normal?)I've attempted to add
@builder.io/react
and@emotion/core
to that list, but that has not solved the issue...Thanks in advance for any guidance on this 🙏