-
카테고리
-
세부 분야
풀스택
-
해결 여부
해결됨
<StopOutLined> 이 exported 되지 않는 오류
23.10.30 15:47 작성 23.10.30 16:09 수정 조회수 210
0
import { List, Button, Card } from 'antd';
import { StopOutLined } from '@ant-design/icons';
로 임포트를 했는데도 불구하고 프로필창을 열면 다음과 같은 에러가 납니다터미널에는 에러메시지도 뜨고요error - ./components/FollowList.js
Attempted import error: 'StopOutLined' is not exported from '@ant-design/icons'.
npm i antd antd 와 npm install @ant-design/icons --save-dev로 다시 설치해봤는데 해결되지 않았습니다
package.json 에서 확인한 버전입니다
"antd": "^5.10.2",
"@ant-design/icons": "^5.2.6",
FollowList.js 에서 의심스러운 부분입니다
import { List, Button, Card } from 'antd';
import { StopOutLined } from '@ant-design/icons';
const FollowList = ({header, data}) => {
return (
<List
renderItem={(item) => (
<List.Item style={{ marginTop: 20 }}>
<Card actions={[<StopOutLined key="stop" />]}>
<Card.Meta description={item.nickname} />
</Card>
</List.Item>
)}
/>
)
};
답변을 작성해보세요.
0
sscapstondesign3
질문자2023.10.30
안녕하세요! npm uninstall 로 antd와 @ant-design/icons 삭제하고
antd는 4.6.6 , @ant-design/icons 는 4.2.2 버전으로 재설치했는데 오류가 해결되지 않았습니다ㅠㅠ 똑같은 에러메시지가 뜨는데 어떻게 해결해야 할까요...
package.json에서 확인하면
"@ant-design/icons": "^4.2.2",
"antd": "^4.6.6",
으로 뜹니다 ㅠㅠ
sscapstondesign3
질문자2023.10.30
npm ls antd하면
react-nodebird-front@1.0.0 C:\Users\pc\react-nodebird\prepare\front
`-- antd@4.6.6
npm ls @ant-design/icons하면
react-nodebird-front@1.0.0 C:\Users\pc\react-nodebird\prepare\front
+-- @ant-design/icons@4.2.2
`-- antd@4.6.6
+-- @ant-design/icons@4.2.2 deduped
`-- rc-image@3.0.6
`-- @ant-design/icons@4.2.2 deduped
이렇게 뜹니다!
답변 1