질문&답변
[ERROR] MSW Server-Side 적용 실패 에러 / (Module not found Error '_http_common')
안녕하세요 저도 해당 문제 겪어서 해결했습니다. 공유해드립니다 node: 18버전 next: 14.2.5버전 "dependencies": { ... "next": "14.2.5", "react": "^18.3.1", "react-dom": "^18" }, "devDependencies": { "@types/node": "^20", "@types/react": "^18.3.1", "@types/react-dom": "^18", "msw": "^2.4.3", ... }, 원래 msw 2.7.0버전에서 2.4.3버전으로 버전을 낮추고, next.config.mjs에서 밑에 링크에 들어가서 복사붙여넣기해서 해결했습니다. // src/app/layout.tsx import type { Metadata } from 'next'; import './globals.css'; import appleSdGothic from '@/components/AppleSdGothic'; import MSWComponent from '@/components/MSWComponent'; import ReactQueryProviders from '@/hooks/useReactQuery'; export default function RootLayout({ children, }: Readonly ) { return ( {children} ); } 참고 https://github.com/mswjs/msw/issues/2291
- 좋아요수
- 0
- 댓글수
- 3
- 조회수
- 480





