You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
λ react-native init xxx --version react-native@next
...
λ yarn react-native run-android
yarn run v1.13.0
$ E:\code\rn-next\xxx\node_modules\.bin\react-native run-android
error Looks like you installed react-native globally, maybe you meant react-native-cli?
To fix the issue, run:
npm uninstall -g react-native && npm install -g react-native-cli
error Command failed with exit code 1.
Description
The problem is to checked path error in function isInstalledGlobally:
// packages/cli/src/util/isInstalledGlobally.jsexportdefaultfunctionisInstalledGlobally(){if(isWindows){// On Windows, assume we are installed globally if we can't find a// package.json above node_modules.return!fs.existsSync(path.join(__dirname,'../../../package.json'));}// On non-windows, assume we are installed globally if we are called from// outside of the node_mobules/.bin/react-native executable.constscript=process.argv[1];returnscript.indexOf('node_modules/.bin/react-native')===-1;}
RN0.59.0.rc project init will not exists '../../../package.json' that is 'node_modules/@react-native-community/package.json' . Now I must be create it voluntarily to ignore the error.
The text was updated successfully, but these errors were encountered:
Environment
Description
The problem is to checked path error in
function isInstalledGlobally
:RN0.59.0.rc project init will not exists '../../../package.json' that is 'node_modules/@react-native-community/package.json' . Now I must be create it voluntarily to ignore the error.
The text was updated successfully, but these errors were encountered: