Я получаю ошибку ниже в android studio для "Syn c Project с файлом Gradle"
Расположение:
- nodejs: C: \ Program Files \ nodejs \ node_modules \ npm A). C: \ Program Files \ nodejs \ node_modules \ npm \ node_modules@react-native-community \ cli-platform- android B). C: \ Program Files \ nodejs \ node_modules \ npm \ node_modules@react-native-community \ cli-tools
2. Android Studio: C: \ Program Files \ Android \ Android Studio \
3. Android Studio Project: C: \ Users \ James \ AndroidStudioProjects \ Test-app \
4. Расположение папок ". android", " .AndroidStudio3.6 ",". Gradle "," AndroidStudioProjects ": C: \ Users \ James \
5. C: \ Users \ James \ AppData \ Roaming \ npm \ node_modules \
6. C: \ Users \ James \ AndroidStudioProjects \ Test-app \ node_modules@react-native-community \ cli-platform- android
7. C: \ Users \ James \ AndroidStudioProjects \ Test-app \ node_modules@react-native-community \ cli-tools
Версии:
- Система: Windows 10
- npm -v: 6.14. 4
- узел -v: v12.16.2
- "версия": "3.1.4" для C: \ Users \ James \ AndroidStudioProjects \ Test-app \ node_modules@react-native-community \ cli -platform-android \ package. json (Пробный пакет. json с версией 2.1 также, но не работал.)
Ошибка:
Caused by: java.lang.Exception: internal/modules/cjs/loader.js:983 throw err; ^Error: Cannot find module 'react-native/cli'Require stack:- C:\Users\James\Test-app\android[eval] at Function.Module._resolveFilename (internal/modules/cjs/loader.js:980:15) at Function.Module._load (internal/modules/cjs/loader.js:862:27) at Module.require (internal/modules/cjs/loader.js:1042:19) at require
(internal/modules/cjs/helpers.js:77:18) at [eval]:1:13 at Script.runInThisContext (vm.js:120:20) at Object.runInThisContext (vm.js:311:38) at Object. ([eval]-wrapper:10:26) at Module._compile (internal/modules/cjs/loader.js:1156:30) at evalScript (internal/process/execution.js:94:25) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\James\Test-app\android\[eval]' ]}