나는 npm start -- --reset-cache
으로 실행중인 React-Native 응용 프로그램을 가지고 있습니다. 그런 다음 react-native run-android
을 실행합니다.번들링에 실패했습니다 : 오류 및 Re-Native 프로젝트를 실행할 때의 404
그러나, 나는이 npm
서버의 콘솔에서이 문제를 받고 있어요 : 안드로이드 에뮬레이터에서, 다음
Bundling `index.js` [development, non-minified] 0.0% (0/1), failed.
error: bundling failed: Error
at DependencyGraph._getAbsolutePath (/myProjectPath/node_modules/metro-bundler/src/node-haste/DependencyGraph.js:305:11)
at DependencyGraph.getDependencies (/myProjectPath/node_modules/metro-bundler/src/node-haste/DependencyGraph.js:283:4236)
at Resolver.getDependencies (/myProjectPath/node_modules/metro-bundler/src/Resolver/index.js:129:5)
at /myProjectPath/node_modules/metro-bundler/src/Bundler/index.js:642:39
at Generator.next (<anonymous>)
at step (/myProjectPath/node_modules/metro-bundler/src/Bundler/index.js:13:1336)
at /myProjectPath/node_modules/metro-bundler/src/Bundler/index.js:13:1496
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
, 나는군요 :이 나를 혼란
The development server returned response error code: 404
URL: http//10.0.2.2:8081/index.bundle?platform=android&dev=true&minify=false
Body:
{"message": "Cannot find entry file index.js in any of the roots"
. Android 에뮬레이터를 사용 중이므로 index.android.js
대신 index.js
을 찾는 이유는 무엇입니까?
이 문제를 어떻게 해결할 수 있습니까?
'babel-preset-react-native'의 버전은 무엇입니까? 'package.json'에서 확인할 수 있습니다. –
내 버전은'1.9.1'입니다. – octavian
=>'npm uninstall babel-preset-react-native'를 실행하여 현재'babel-preset-react-native'를 unistalling 해보십시오. 문제를 해결할'2.1.0' 버전을 설치하기 위해'npm install babel-preset-react-native @ 2.1.0'을 실행하십시오. –