-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
React-Spring v9 with three fiber has errors when used with Gatsby #1069
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm having the same issue, but it's a webgl error... I have been trying to revert back to an earlier version of react-spring/three with no luck... it continues to demand 9.0.0-rc3. |
I had to go all the way back to three 0.112.3 for this to function. Not sure why. |
Adding this piece of code in exports.onCreateWebpackConfig = ({ stage, actions }) => {
if (stage.startsWith("build-javascript")) {
actions.setWebpackConfig({
module: {
rules: [
{
test: /react-spring/,
sideEffects: true
}
]
}
})
}
} |
Another workaround which worked for me would me using patch-package and creating following patches for all the And you should end up having patches for all of them that looks like that:
though the @andreademasi solution is leaner I guess |
@andreademasi 's solution worked for me too. Just make sure that there are no html build errors (e.g. on use of |
closing due to inactivity. please use discussions or discord if you want more help or please consider creating a PR if you want to add a feature 😄 |
Uh oh!
There was an error while loading. Please reload this page.
🐛 Bug Report
First things first. I'm not sure if this bug has to do with me, Spring, Three Fiber, or Gatsby itself. Hopefully someone with more intimate knowledge will have a better idea.
I'm trying to use react-spring (v9) and react-three-fiber with Gatsby. The reduced example will work while in Gatsby development mode. However, as soon as I build the project, I get an in-browser console error.
**Uncaught (in promise) Error: page resources for / not found. Not rendering React
at production-app.js:128 **
There are no build errors. The error seems to occur with the use of <a.mesh>. As soon as replace with "mesh", it will build and run without errors. It may also be important to note that if I switch to react-spring v8, everything works fine. (I need to use v9 for other reasons)
To Reproduce
Build a project with Gatsby, React-spring(v9) /three using <a.mesh>.
Minimal repo:
https://github.com/anim8rDev/meshError
Expected behavior
No errors in browser console and able to see canvas with mesh object.
Link to repro (highly encouraged)
https://github.com/anim8rDev/meshError
Environment
"@react-spring/core": "^9.0.0-rc.3",
"@react-spring/three": "^9.0.0-rc.3",
"@react-spring/web": "^9.0.0-rc.3",
"react-three-fiber": "^4.2.12",
"three": "^0.118.1"
"react": "^16.12.0",
"gatsby": "^2.23.11",
The text was updated successfully, but these errors were encountered: