我尝试了几个选项。
选项 1(网站):
npm install -g react-native-cli react-viro-cli
react-viro init test_app
npm start
错误!
"." не является внутренней или внешней командой, исполняемой программой или пакетным файлом.
("." is not an internal or external command, executable program or batch file.)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! AR_APP@0.0.1 prestart: `./node_modules/react-viro/bin/run_ngrok.sh`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the AR_APP@0.0.1 prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Roaming\npm-cache\_logs\2020-03-03T17_11_44_092Z-debug.log
//package.json
"scripts": {
"prestart": "./node_modules/react-viro/bin/run_ngrok.sh",
"start": "node node_modules/react-native/local-cli/cli.js start",
"test": "jest"
},
选项 2(网站):
react-native init test_app --version=0.59.3
cd test_app && npm install -S -E react-viro
npm start
// Running port 8081.
// What's the next step? Ok, i installed ngrok
ngrok http 80
我不知道下一步该做什么。android上完成的样例请给出详细的安装方案。