Error: Unable to resolve module `./index` from `\node_modules\react-native\scripts/.`
1088 단어 RN
./index
from
ode_modules\react-native\scripts/.
: The module ./index
could not be found from
ode_modules\react-native\scripts/.
. Indeed, none of these files exist: "react": "^16.8.4", "react-native": "^0.59.0",
해결 방법:
Though you will need to do this for every time you start a new project.. its an upgrade issue from react-native
Update node_modules\react-native\scripts\launchPackager.bat file. @echo off title Metro Bundler call .packager.bat // delete this line
node "%~dp0..\cli.js" start
Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../
pause
exit
We are giving project root path to Metro instance here,
Or in ode_modules@react-native-community\cli\build\commands\runAndroid\runAndroid.js edit this, const procConfig = { // delete this line
cwd: scriptsDir
// add this line
cwd: process.cwd()
};
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
(TIL) 6. React-Native : NativeBase (+ cleanArchitecture)
RN을 사용하는 사람들에게 재밌는 lib 일 것 같습니다.
기존 RN의 StyleSheet와는 달리 인라인으로 style props를 작성할 수 있고, 다양한 기능들을 지원하고 있는 입니다.
싶었는데, 비슷하긴 한 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.
// delete this line
node "%~dp0..\cli.js" start
Add this line
node "%~dp0..\cli.js" start --projectRoot ../../../
pause
exit
// delete this line
cwd: scriptsDir
// add this line
cwd: process.cwd()
};
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
(TIL) 6. React-Native : NativeBase (+ cleanArchitecture)RN을 사용하는 사람들에게 재밌는 lib 일 것 같습니다. 기존 RN의 StyleSheet와는 달리 인라인으로 style props를 작성할 수 있고, 다양한 기능들을 지원하고 있는 입니다. 싶었는데, 비슷하긴 한 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.