ユーザ用ツール

サイト用ツール


reactnative:エラー

差分

この文書の現在のバージョンと選択したバージョンの差分を表示します。

この比較画面にリンクする

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
reactnative:エラー [2019/03/30 13:24]
ips
reactnative:エラー [2019/04/02 06:20] (現在)
ips
ライン 36: ライン 36:
 </​code>​ </​code>​
  
 +===== Looking for JS files in =====
 +
 +いままで起動できていたのにできなくなった。
 +
 +{{:​reactnative:​pasted:​20190401-070216.png}}
 +
 +<​code>​
 +Looking for JS files in
 +   ​C:​\Users\[User]\react\native_background_timer\node_modules\react-native\scripts
 +
 +Loading dependency graph, done.
 +Error: Unable to resolve module `./index` from `C:​\Users\[User]\react\native_background_timer\node_modules\react-native\scripts/​.`:​ The module `./index` could not be found from `C:​\Users\[User]\react\native_background_timer\node_modules\react-native\scripts/​.`. Indeed, none of these files exist:
 +  * `C:​\Users\[User]\react\native_background_timer\node_modules\react-native\scripts\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
 +  * `C:​\Users\[User]\react\native_background_timer\node_modules\react-native\scripts\index\index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)`
 +    at ModuleResolver.resolveDependency (C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:​163:​15)
 +    at ResolutionRequest.resolveDependency (C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\node-haste\DependencyGraph\ResolutionRequest.js:​52:​18)
 +    at DependencyGraph.resolveDependency (C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\node-haste\DependencyGraph.js:​283:​16)
 +    at C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\lib\transformHelpers.js:​261:​42
 +    at Server.<​anonymous>​ (C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\Server.js:​1038:​41)
 +    at Generator.next (<​anonymous>​)
 +    at asyncGeneratorStep (C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\Server.js:​99:​24)
 +    at _next (C:​\Users\[User]\react\native_background_timer\node_modules\metro\src\Server.js:​119:​9)
 +::​ffff:​127.0.0.1 - - [31/​Mar/​2019:​21:​59:​04 +0000] "GET /​index.delta?​platform=android&​dev=true&​minify=false HTTP/​1.1"​ 500 - "​-"​ "​okhttp/​3.12.1"​
 +</​code>​
 +
 +[[https://​github.com/​facebook/​react-native/​issues/​23908|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: #23908]]
 +
 +とりあえず、
 +<​html>​react-native start -- --reset-cache</​html>​
 +
 +<​html>​react-native run-android</​html>​
 +を別コマンドラインで実行すると起動するが、今までどおりにはできない。
 +
 +==== 対応その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で表示された!
  
reactnative/エラー.1553919861.txt.gz · 最終更新: 2019/03/30 13:24 by ips