레이블이 nextjs인 게시물을 표시합니다. 모든 게시물 표시
레이블이 nextjs인 게시물을 표시합니다. 모든 게시물 표시

2024년 12월 24일 화요일

Cannot find module 'next/dist/server/future/route-modules/pages/vendored/contexts/amp-context'

 nextjs를 output='standalone'으로 빌드시 

Cannot find module 'next/dist/server/future/route-modules/pages/vendored/contexts/amp-context'

오류가 발생


원인 

build 하고 standalone/.next/node_modules/next/dist 폴더에

shared 디렉토리만 존재하고 있음. 모듈 빌드가 제대로 되지 않은듯


해결책

nextjs 버전을 변경한다. 

^14.2.21 버전에서 ^14.2.13으로 변경

2024년 5월 16일 목요일

Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly

 nextjs 12.3.4버전

 standalone 모드로 빌드 후 도커에서 실행시 발생한 에러 

https://github.com/vercel/next.js/issues/59516 참조

최초 sharp 버전 : 0.33.3 을 버전 : 0.32.6 으로 다운 그레이드