커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
4-7 강의 Card.js, DetailPage.js 코드스니펫 적용 에러
[왕초보] 나만의 수익성 앱, 앱개발 종합반
4주차
북마크
이*규
댓글
1
추천
0
조회수
7
조회수
7
답변 완료


저도 아래 링크의 학생분과 비슷한 에러가 떠서 링크에 달린 답변 보고 문제는 해결했는데요


https://spartacodingclub.kr/community/fastqna/all/63242573413ed25c4aac7235/4-7%20%EA%B0%95%EC%9D%98%20%EB%8F%84%EC%A4%91%20%EC%BD%94%EB%93%9C%EC%8A%A4%EB%8B%88%ED%8E%AB%20%EC%A0%81%EC%9A%A9%ED%95%98%EB%8B%88%EA%B9%8C%20%EC%95%B1%EC%97%90%EC%84%9C%20%EC%97%90%EB%9F%AC%EA%B0%80%20%EB%82%A9%EB%8B%88%EB%8B%A4.


이런 문제가 발생하는 원인은 뭔가요? 새로 생성된 metro.config.js는 어떠한 기능을 하고 있는건지요?

그리고 이런 상황이 실제 개발과정에서도 흔히 발생하는 과정인가요? 보통 이런 에러들이 발생하면 현업 개발자들은 어떻게 해결하나요?





작성한 코드 및 에러 메세지


에러 메시지:

Android Bundling failed 2850ms

While trying to resolve module `idb` from file `C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\@firebase\app\dist\esm\index.esm2017.js`, the package `C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\build\index.cjs`. Indeed, none of these files exist:


 * C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\build\index.cjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

 * C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\build\index.cjs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

Android Bundling failed 3550ms

While trying to resolve module `idb` from file `C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\@firebase\app\dist\esm\index.esm2017.js`, the package `C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\build\index.cjs`. Indeed, none of these files exist:


 * C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\build\index.cjs(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)

 * C:\Users\leefa\OneDrive\바탕 화면\sparta-study\sparta-myhoneytip-kyoo\node_modules\idb\build\index.cjs\index(.native|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.js|.native.js|.js|.android.jsx|.native.jsx|.jsx|.android.json|.native.json|.json)


metro.config.js

module.exports = {
    transformer: {
      getTransformOptions: async () => ({
        transform: {
          experimentalImportSupport: false,
          inlineRequires: false,
        },
      }),
    },
    resolver: {
      sourceExts: ['jsx', 'js', 'ts', 'tsx', 'cjs', 'fs'],
    },
  };




취소
 공유
취소
댓글 0
댓글 알림
나의얼굴