-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
failed to build custom less files in with-ant-design-less
sample with target: serverless
#8151
Comments
yep, encountering the same problem |
same problem here |
Tried working on this as my first issue. Adding Would that suffice as a solution to this problem? |
@enochN did you test on https://github.com/bokuo-okubo/next-with-ant-design-less-failed? I still get the problem:TypeError: (0 , _styleChecker.default) is not a function |
So when I go through the step to reproduce, I got two unrelated errors. Since the errors involving react-ssr-prepass and styled-components do not occur in the Now when I apply my proposed solution of adding the indexof package to the bokuo-okubo's repo, the solution works. You can find my efforts here. |
@skenan I got the same problem when using ant design with nextjs. I run npm run build locally and it works fine, but when it comes to deployment, the error: { TypeError: (0 , _styleChecker.default) is not a function occurs to me. Have you found a way to fix this? |
Update, found out that when I use Typography component, such as Typography.Text (from ant design), this error occurs. I'm not quite sure how to resolve this, which means not being able to use this component entirely. |
@aaazureee Could you try adding "indexof": "0.0.1" to your dependencies? Doing that worked for the sample projects I tested with. |
@enochN I cloned your project and run the build command, the issue The value |
Oh okay. I must be doing something wrong in my environment then. Will investigate further. Thanks |
The weird thing is that my npm run build locally is working fine, but when deployed to zeit, the build log shows the error above. |
Update: I fixed this by using next@canary instead, no more error during deployment build log. |
Have the same issue with the repo provided. Not entirely sure why Typography from ant design is breaking the build. Removing it will resolve the issue but it's not ideal |
Just found the solution, at the |
Duplicate of #9830 |
* create header as a shared component * styling use CSS Grid * move header component to organisms * create hot-it-works page * remove props * add a link button to MainHeader * change link size to large * improve how-it-works page * improve header's css * update information on how-it-works * fix a build error Reference: vercel/next.js#8151 (comment)
Fixes issue when encountering: ```cli > Build error occurred TypeError: (0 , _styleChecker.isStyleSupport) is not a function ``` See: vercel/next.js#8151 (comment)
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Bug report
Describe the bug
In the case using
target: 'serverless'
flag innext.config.js
, the with-ant-design-less sample code build failed.To Reproduce
yarn
(also in the case remove
target: 'serverless'
flag, build works fine.)Expected behavior
I tried to build with the check condition also options.dev flag, it works fine.
https://github.com/bokuo-okubo/next-with-ant-design-less-failed/blob/4ceee6c40d3a3e52ef52407715b3a056c03f9605/next.config.js#L34
In the case of using
target: 'serverless'
mode,config.externals
contain theamp-toolbox-optimizer
, so the something wrong around there.Screenshots
System information
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: