Error: Unable to resolve module
./index
from
\node_modules\react-native\scripts/.
: The module
./index
could not be found from
\node_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
// 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()
};