-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
downgrading ansi-regex version 4 to 3 - an arrow function was used in… #3181
Conversation
… version 4 that made next.js throwing errors in old browsers
Word. Experiencing the same thing! @timneutkens |
If you're using Yarn you can work around this issue with: "resolutions": {
"next/strip-ansi": "3.0.1"
} See: https://yarnpkg.com/lang/en/docs/selective-version-resolutions/ |
@haydn thank you it worked really well. although it doesn't work in Development but it works like a charm in Production. |
Applied a fix that didn't involve downgrading ansi-regex. It was being build into the production bundle, even though it wasn't being used (only in development). So this error is going in production mode. @iamsoorena has confirmed it works on slack 👍 |
In what version @timneutkens ? |
@ptomasroos |
@timneutkens doesn't seem to have been fixed in next@canary, still getting the ansiregex syntax error (arrow function) running with a custom server, so not sure if it's because of that? |
@mattywong Did you try it in production environment? |
@timneutkens my bad, it's working fine now in production thanks! |
So this still doesn't solve the "Fetch as Google / PageSpeed" problem. ie, |
The problem still persists. |
Anyone, please help, I just migrated to next on the promise of good SEO and now everything is in the air :-( https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fcompareali.com%2F Runing NestJs version 6.. |
I see that the Zeit.co website it's working properly! @rauchg what are you and your team doing in order it should work? |
Next by itself doesn't need polyfills by default, but you're most likely using an external library does. Example of basic Next.js: The with-polyfills example shows how to configure polyfills as-needed: Since you asked, this is the polyfills we add:
|
@timneutkens so basically every web app will need different polyfills in order to be supported in Chrome 41, the version that Google Bot uses? |
since there was an arrow function used in strip-ansi version 4, next.js was throwing errors is versions 3+.
so we should either use the old version of strip-ansi or we should compile it.
more info about the problem of version 4 of strip-ansi is found here.