-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
@react-spring/core or @react-spring/three production errors #1078
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
Please provide a git repository that reproduces the issue. Thanks 👍 |
The entirety of the code is in that snippet. You need to run it in with an application set to production mode. Also it seems like this is not the first time it has occured as a similar production issue mentioned here #1069 I think I've provided enough information. If you want to chase it down feel free, if not thats fine too. @aleclarson |
#1069 is related to Gatsby. Are you using that? If not, could you provide the webpack config that reproduces the issue? Thanks 👍 |
I'm not using Gatsby. I've come across this using Nextjs |
That's good to know! 😆 Can you share your |
Heres the config, in case you're wondering what the transpile plugin below is for, it's that those modules depend on threejs // next.config.js
const withPlugins = require('next-compose-plugins');
const withTM = require('next-transpile-modules')([
'drei',
'three',
'postprocessing'
]);
const refract = require('refractor');
const images = require('remark-images');
const prism = require('@mapbox/rehype-prism');
const styledHighlight = {
'styled-template-string': {
pattern: /(styled(\.\w+|\([^\)]*\))(\.\w+(\([^\)]*\))*)*|css|injectGlobal|createGlobalStyle|keyframes|\.extend|\.withComponent)`(?:\$\{[^}]+\}|\\\\|\\?[^\\])*?`/,
lookbehind: true,
greedy: true,
inside: {
interpolation: {
pattern: /\$\{[^}]+\}/,
inside: {
'interpolation-punctuation': {
pattern: /^\$\{|\}$/,
alias: 'punctuation'
},
rest: refract.languages.jsx
}
},
string: {
pattern: /[^$;]+/,
inside: refract.languages.css,
alias: 'language-css'
}
}
}
};
refract.languages.insertBefore('jsx', 'template-string', styledHighlight);
refract.languages.insertBefore('js', 'template-string', styledHighlight);
const withMDX = require('@next/mdx')({
extension: /\.mdx?$/,
options: {
remarkPlugins: [images],
rehypePlugins: [prism]
}
});
module.exports = withPlugins([withMDX, withTM], {
pageExtensions: ['ts', 'tsx', 'md', 'mdx']
}); |
Btw, the error doesn't cause the page to break or anything. Just makes my R3F components that depend on react-spring animation not render. All other R3F components work like normal |
I also get this when bundling with |
Interestingly, that's the version of webpack that |
Hi. |
Also there is a very similar error when build with typescript.
work fine in dev, but build app not starting due to error:
Which is apparently line Here repository with this error - https://github.com/ivnaleta/ts-three-spring-build-error |
The issue was that |
Need some suggestion / some help.
I tried to fork 9x branch, but currently |
@ivnaleta You could manually remove Otherwise, if you still want to build v9 locally, you can follow the Contributing Guide and let me know if something trips you up. 👍 |
@aleclarson |
I can confirm that using NextJS with webpack > ^4.44.x is broken by this, in the mean time you can force webpack to ~4.43.x with resolutions in your package.json:
|
I'm not opposed to waiting for a fix in the next version, any idea of when that might be? |
I can confirm that upgrading from NextJS |
This is a known issue in react-spring, and will be fixed in the next RC release. [see this](pmndrs/react-spring#1078)
I'm hitting this in a similar environment (Next + r3f + react-spring) and none of the workarounds listed here work. ⛔ |
@aleclarson Is there a way to use patch-package? Because it seems that it doesn't patch the changes that are only applied to the |
RC 3 has been released for months now. Since then, there are quite some commits and updates. Are there any plans to release an RC 4 or even an official release? |
Please see #1330 |
@joshuaellis Hi! I've update |
@Emiliano-Bucci, the latest version being 9? Can you share a repo, this is odd. |
@joshuaellis Yes, version 9 (sorry); i'll create a repo to reproduce asap (sadly it's a private repo the one where I find the issue); I'll let you know :) |
Thansk @Emiliano-Bucci lets open a new issue too. |
Is there a way to modify this webpack in create-react-app without ejecting? |
Have a look at |
Thanks, got it working! If anyone is using craco this craco.config.js works:
|
HDS notification use react-spring which has a bug when building for production pmndrs/react-spring#1078 Created a copy and took off all animation features so react-spring is not needed.
`react-spring` has been upgraded to `9.7.5` in order to retrieve a fix for rsbuild projects where the bottom sheet would fail to open due to `.willAdvance is not a function` error More info: pmndrs/react-spring#1078
`react-spring` has been upgraded to `9.7.5` in order to retrieve a fix for rsbuild projects where the bottom sheet would fail to open due to `.willAdvance is not a function` error More info: pmndrs/react-spring#1078
`react-spring` has been upgraded to `9.7.5` in order to retrieve a fix for rsbuild projects where the bottom sheet would fail to open due to `.willAdvance is not a function` error More info: pmndrs/react-spring#1078
Since the rslib migration, the mui-bottom-sheet component would not work anymore due to `.willAdvance is not a function` error This is due to library's side effects that are erased by the tree shaking mechanism To prevent that we change the rsbuild configuration to handle those side effects More info: pmndrs/react-spring#1078
Since the rslib migration, the mui-bottom-sheet component would not work anymore due to `.willAdvance is not a function` error This is due to library's side effects that are erased by the tree shaking mechanism To prevent that we change the rsbuild configuration to handle those side effects More info: pmndrs/react-spring#1078
Since the rslib migration, the mui-bottom-sheet component would not work anymore due to `.willAdvance is not a function` error This is due to library's side effects that are erased by the tree shaking mechanism To prevent that we change the rsbuild configuration to handle those side effects More info: pmndrs/react-spring#1078
🐛 Bug Report
Hi, i'm using these to animate R3F components, but I do not run into this in development. The issue only occurs in production:
To Reproduce:
Here is the code example i'm trying to run, and again, I want to stress this only happens in production
Expected behavior
I expect it to run well, just like it does in development
Environment
The text was updated successfully, but these errors were encountered: