-
Notifications
You must be signed in to change notification settings - Fork 26k
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
error @next/swc-darwin-x64@11.1.2: The platform "linux" is incompatible with this module. error Found incompatible module. #37651
Comments
You should not be adding When you add a Babel file, SWC won't be used at all. It's hard to know why there would be a flash, but since you are on an older version of Next.js, you might want to try Without a reproduction, it's hard to tell what might cause the flicker, so please add one, so we can help you investigate. |
I removed I believe I'm using the most recent version of Next.js, my package.json contains: I still want to use SWC, it might fix the flicker issue but I'm not 100% sure. I added in a quick recording for you to see it for yourself – I'm not sure if this is sufficient enough for a reproduction, but let me know if there's anything else I can provide. Please note that this repo is also private, thanks. Screen.Recording.2022-06-13.at.12.49.37.PM.mov |
We will have to look at your code. If your repository is private, feel free to invite me. Otherwise please create a minimal reproduction. |
I just added you to the repository, let me know what else I can do, thanks. |
I'm unable to compile/start the dev server in the repository because of missing dependencies, some seemingly broken/missing code, and probably the missing backend for the GraphQL API, so I'll try to guess here. It looks like you are using https://www.npmjs.com/package/next-remove-imports which hasn't been updated in 9 months and might be modifying the Next.js webpack configuration in unforeseen ways. There is no semver guarantee when you are changing the default config. A regression has been fixed regarding the UI library you are using, see #36675. Also, there might be still issues with the UI library, I found these: |
It turned out to be a CSS regression issue. I fixed it by downgrading back to React 17. |
This does not sound like a proper fix though. 🤔 Could you create a minimal/runnable reproduction so I can look into this more? I just tried our example https://github.com/vercel/next.js/tree/canary/examples/with-mantine and it works correctly using |
Hi, the initial issue appears to be resolved, if you are still experiencing CSS issues with react 18 on the latest canary of Next.js please open a fresh issue so we can investigate that further! |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
I get this error when trying to deploy on Vercel:
error @next/swc-darwin-x64@11.1.2: The platform "linux" is incompatible with this module.
error Found incompatible module.
I removed
"@next/swc-darwin-x64"
from my package.json and added a .babelrc file with:{ "presets": ["next/babel"] }
in it.When I removed it, I had a glitch In production where my CSS was messed up for the first 0.5 second when I loaded any page (might be a SSR issue or babel issue) but I'm not sure and would love some help. If anyone knows how to fix the SWC issue or CSS issue, please let me know! Thanks.
What browser are you using? (if relevant)
Brave
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
I get this error when deploying my Next.js app to Vercel:
error @next/swc-darwin-x64@11.1.2: The platform "linux" is incompatible with this module.
error Found incompatible module.
Expected Behavior
To deploy sucessfully.
To Reproduce
Not sure how to reproduce this, but I have:
"@next/swc-darwin-x64": "^11.1.2"
in my package.json. I think this issue has been resolved in #34989 but I'm not sure how it was fixed. When I remove"@next/swc-darwin-x64": "^11.1.2"
from my package.json, I run into babel performance issues as mentioned above.The text was updated successfully, but these errors were encountered: