この文書の現在のバージョンと選択したバージョンの差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
reactnative:エラー [2019/04/01 07:05] ips |
reactnative:エラー [2019/04/02 06:20] (現在) ips |
||
---|---|---|---|
ライン 69: | ライン 69: | ||
を別コマンドラインで実行すると起動するが、今までどおりにはできない。 | を別コマンドラインで実行すると起動するが、今までどおりにはできない。 | ||
+ | ==== 対応その1 ==== | ||
+ | |||
+ | node_modules\react-native\scripts\launchPackager.bat | ||
+ | <code> | ||
+ | :: Copyright (c) Facebook, Inc. and its affiliates. | ||
+ | :: | ||
+ | :: This source code is licensed under the MIT license found in the | ||
+ | :: LICENSE file in the root directory of this source tree. | ||
+ | |||
+ | @echo off | ||
+ | title Metro Bundler | ||
+ | call .packager.bat | ||
+ | :: DELETE | ||
+ | :: node "%~dp0..\cli.js" start //DELETE | ||
+ | |||
+ | :: ADD | ||
+ | node "%~dp0..\cli.js" start --projectRoot ../../../ | ||
+ | pause | ||
+ | exit | ||
+ | </code> | ||
+ | |||
+ | ==== 対応その2 ==== | ||
+ | もしくは | ||
+ | \node_modules\@react-native-community\cli\build\commands\runAndroid\runAndroid.js を編集 | ||
+ | <code> | ||
+ | const procConfig = { | ||
+ | |||
+ | // delete this line | ||
+ | cwd: scriptsDir | ||
+ | |||
+ | // add this line | ||
+ | cwd: process.cwd() | ||
+ | }; | ||
+ | </code> | ||
+ | |||
+ | 対応1で表示された! | ||