이글은 제목과같은 문제가 생겨 남긴 기록이다. 

아마 타 공간에서 이 프로젝트를 돌리면 똑같은 문제가 발생하겠지.

 

 

우선 이 문제를 해결한 아주 고마우신분의 글이다

 

https://stackoverflow.com/questions/49505446/main-jsbundle-does-not-exist-this-must-be-a-bug-with-echo-react-native

 

main.jsbundle does not exist. this must be a bug with + echo 'react native

I tried to archive my react native project using Product > Archive on XCode9.2. But Xcode produce this error: File /Users/louis/Library/Developer/Xcode/DerivedData/Scavenger-

stackoverflow.com

 

역시 스택오버플로우는 날버리지않았어...

 

rn으로 작성된 프로젝트의 여러 기본 설정이 들어가는 package.json 파일에 해당 스크립트를 추가한다.

"build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'"

 

없다고 뭐라한 파일은 사실 rn에서 빌드하면 생기는 파일이였다.

해당 파일을 빌드후 원래 있어야할 폴더에 생성해주는 스크립트이다

 

아래와 같이 스크립트 란에 추가하면된다.

 "scripts": {
    "build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'",
    등등 여러가지 스크립트
  },

 

해당 파일을 작성만 해주면되는데 (프로젝트 루트에서 yarn build:ios)

이래도 안된다면 xcode 프로젝트 설정의 빌드패스에 생성된 해당 파일을 추가해준다.

 

 

사실난 스크립트란에서 안됐는데 해당문제는 깃에 올라온 파일을 압축해서 다운받았으나 빠진 파일들이 있었다.... 그렇게 오류난 파일들을 다운로드해주고 스크립트를 돌리고 해결..

+ Recent posts