Next.js Discord

Discord Forum

My build is failing in vercel with below log since last 24 hrs can someone please help.

Unanswered
Kombai posted this in #help-forum
Open in Discord
KombaiOP
Detected Next.js version: 13.4.8
Running "yarn run build"
yarn run v1.22.17
$ next build
- info Loaded env from /vercel/path0/.env.production
- info Loaded env from /vercel/path0/.env
- info Linting and checking validity of types...
- info Creating an optimized production build...
Failed to compile.
./components/AvatarBox.js
Module not found: Can't resolve 'antd/es/Avatar'
https://nextjs.org/docs/messages/module-not-found

I have checked antd version and also upgraded to latest. Local build is sucess everytime with "yarn run build".
It suddently starts failing on Vercel. Kindly help.

4 Replies

@joulev Try “antd/es/avatar” with lowercase avatar
KombaiOP
As per antd documentation we have imported like this: import { Avatar } from 'antd';

const AvatarBox = ({ children, size, dataItem }) => {
return (
<div className='avatar-box-container'>
<Avatar size={size} src={dataItem.profile_images[0].url} onClick={() => alert("HII")}/>
{children}
</div>
)
}

export default AvatarBox
in that case idk, i don't use antd... you need to wait for someone else to help
KombaiOP
Ohk. No problem. Thanks for responding.