npm run build:prod 에러
1359
작성한 질문수 13
ec2 instance connect 에서 npm run build:prod 시 에러가 뜹니다
ubuntu@ip-172-31-7-125:~/raddit-clone-deploy/client$ npm run build:prod
> client@0.1.0 build:prod
> env-cmd -f .env.production next build
info - Loaded env from /home/ubuntu/raddit-clone-deploy/client/.env.production
Failed to compile.
./src/pages/_app.tsx
31:3 Error: Synchronous scripts should not be used. See: https://nextjs.org/docs/messages/no-sync-scripts @next/next/no-sync-scripts
./src/pages/index.tsx
42:5 Warning: React Hook useEffect has missing dependencies: 'observeElement' and 'observedPost'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
./src/pages/r/[sub].tsx
28:7 Warning: React Hook useEffect has missing dependencies: 'authenticated' and 'user'. Either include them or remove the dependency array. react-hooks/exhaustive-deps
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
info - Linting and checking validity of types .ubuntu@ip-172-31-7-125:~/raddit-clone-deploy/client$ ^C31:3 Error: Synchronous scripts should not be used. See: https://nextjs.org/docs/messages/no-sync-scripts 여기서 async 나 defer 추가하래서
client>src>pages>_app.tsx에서
return <>
<Head>
<script defer src="https://kit.fontawesome.com/0d9816814b.js" crossOrigin="anonymous"></script>
</Head>
<SWRConfig
value = {{
fetcher
}}>
<script defer src="https://kit.fontawesome.com/0d9816814b.js" crossOrigin="anonymous"></script>추가해보았지만 해결이 안되었습니다.
선생님 소스코드 보니 integrity가 추가되었는데 이게 문제일까요?
<script defer src="https://use.fontawesome.com/releases/v6.1.1/js/all.js" integrity="sha384-xBXmu0dk1bEoiwd71wOonQLyH+VpgR1XcDH3rtxrLww5ajNTuMvBdL5SOiFZnNdp" crossOrigin="anonymous"></script>
답변 1
toJson을 추가하면 [sub].tsx에서 sub를 받아오지 못합니다.
0
118
2
쿠키 저장이 되지 않습니다.
0
223
1
AxiosError {message: 'Request failed with status code 401/500', name: 'AxiosError', code: 'ERR_BAD_RESPONSE', (2)
0
580
1
AxiosError {message: 'Request failed with status code 401/500', name: 'AxiosError', code: 'ERR_BAD_RESPONSE',
0
647
1
overload 에러
0
170
1
docker compose up 오류
0
206
1
부록) remark 강의 중 parmas 오류
0
139
1
3000번은 잘 들어가지는데 80번은 안됩니다.
1
293
0
커뮤니티를 올리고 난 후 404 page
0
209
1
tailwind css 문제인지, className 에 적용한 css가 적용되지 않아요.
0
1042
2
tsx 수정 시 마다 빌드 후 서버 시작 해야하나요?
0
652
2
useState 쳤을 때 자동완성 되는 단축키 무엇인가요? extention 인가요?
0
805
2
리액트 서버 npm run dev 와 npm run build 후 npm start 의 차이
0
4593
2
data 폴더가 생성되지 않아요.
0
524
1
docker-compose up 오류
0
814
1
회원 가입 페이지 기능 생성(3) 중 에러
0
379
2
Entity에 toJSON 코드 입력 후 404 에러
0
252
1
context에서 useEffect 선언 부분 질문 있어요.
0
294
1
src 폴더구조
0
509
2
서버 실행 시 에러 관련하여 답변받고 1차 조치했는데 여전하여서 질문 남깁니다
0
298
1
엔티티 모두 작성 후 서버 실행 시 에러가 발생합니다
0
312
1
회원가입 누르면 404에러가 뜹니다 ;-;
1
421
1
nextjs버젼에 대해서 질문드립니다.
0
372
1
<npm run dev>시 -61 에러가 나타납니다!
0
357
1





