aws 에서 front 빌드 시 에러가 뜨는데 해매고 있습니다..
836
6 câu hỏi đã được viết
Error: Parsing error: Must use import to load ES Module: /home/ubuntu/new-node-bird-std/front/node_modules/eslint-scope/lib/definition.js
require() of ES modules is not supported.
require() of /home/ubuntu/new-node-bird-std/front/node_modules/eslint-scope/lib/definition.js from /home/ubuntu/new-node-bird-std/front/node_modules/babel-eslint/lib/require-from-eslint.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules.
Instead rename definition.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from /home/ubuntu/new-node-bird-std/front/node_modules/eslint-scope/package.json.
info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! react-nodebird-front@1.0.0 build: `cross-env ANALYZE=true NODE_ENV=production next build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the react-nodebird-front@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ubuntu/.npm/_logs/2022-03-04T00_05_27_105Z-debug.log
AWS 에서 front 쪽 빌드 시 위의 에러가 발생하는데
로컬에선 빌드가 되서 .next gitignore 풀고 github에 올리려 하니 용량 문제가 있는지 그마저도 업로드가 안됩니다.
Câu trả lời 2
0
0
eslintrc 랑 package.json 올려주세요.
0
혹시 제 로컬의 node -v는
14.17.0 & npm -v 8.3.0 이고
우분투에 설치된 node -v는
14.19.0 & npm -v 6.14.16 인데 여기서 영향이 있을 수도 있나요..?
(eslintrc 랑 package.json는 아래의 댓글에 적어놨습니다~!)
0
제로초님, 제가 nvm으로 노드를 설치하여 node 버전 및 nvm install-latest-install로 npm 버전을 저의 로컬 npm 버전과 맞춰준 다음
린트 rules 에
를 추가 하고 나니, 빌드가 되긴 됩니다..! 둘중에 어떤게 원인 인지는 모르겠어서 둘다 적용해 놓으니 되네요; 하나씩 빼보면서 테스트 해보겠습니다;
일단 npm 버전 차이가 가장 의심 스럽긴 한거 같아요..
넥스트 버젼 질문
0
79
2
로그인시 401 Unauthorized 오류가 뜹니다
0
91
1
무한 스크롤 중 스크롤 튐 현상
0
177
1
특정 페이지 접근을 막고 싶을 때
0
104
2
createGlobalStyle의 위치와 영향범위
0
97
2
인라인 스타일 리렌더링 관련
0
93
2
vsc 에서 npm init 설치시 오류
0
148
2
nextjs 15버전 사용 가능할까요?
0
160
1
화면 새로고침 문의
0
123
1
RTK에서 draft, state 차이가 있나요?
0
155
2
Next 14 사용해도 될까요?
0
452
1
next, node 버전 / 폴더 구조 질문 드립니다.
0
349
1
url 오류 질문있습니다
0
211
1
ssh xxxxx로 우분투에 들어가려니까 port 22: Connection timed out
0
378
1
sudo certbot --nginx 에러
0
1282
2
Minified React error 콘솔에러 (hydrate)
0
470
1
카카오 공유했을 때 이전에 작성했던 글이 나오는 버그
0
249
1
프론트서버 배포 후 EADDRINUSE에러 발생
0
329
1
npm run build 에러
0
519
1
front 서버 npm run build 중에 발생한 에러들
0
383
1
서버 실행하고 브라우저로 들어갔을때 404에러
0
339
2
css 서버사이드 랜더링이 적용되지 않아서 문의 드립니다.
0
289
1
팔로워 3명씩 불러오고 데이터 합쳐주는걸로 바꾸고 서버요청을 무한으로하고있습니다.
0
242
2
해시태그 검색에서 throttle에 관해 질문있습니다.
0
202
1

