I'm trying to upgrade docusaurus to the latest version v2.3.1 but got the following errors when running yarn start
yarn start
yarn run v1.22.19
$ docusaurus start
[INFO] Starting the development server...
[ERROR] ValidationError: "trackingID" is required
[INFO] Docusaurus version: 2.3.1
Node version: v18.12.1
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Here is the config:
https://github.com/OpenAPITools/openapi-generator/blob/relesae-fix/website/docusaurus.config.js
Searched for the error message but got nothing related to trackingID in particular.
When I run "npx react-native run-android" it shows the follow message:
info JS server already running.
O sistema n�o pode encontrar o caminho especificado.
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
ERROR: JAVA_HOME is set to an invalid directory: C:\Users\PABLO\AppData\Local\Android\Sdk
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at makeError (C:\Users\PABLO\teste7\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:174:9)
at C:\Users\PABLO\teste7\node_modules\#react-native-community\cli-platform-android\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\PABLO\teste7\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:82:7)
at async Command.handleAction (C:\Users\PABLO\teste7\node_modules\#react-native-community\cli\build\index.js:108:9)
info Run CLI with --verbose flag for more details.
I really do not know what to do to run my android emulator, once I installed conform setting up development the documentation.
I try to install react native and Build failed. Why?
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\Users\stefa\Desktop\REACT\better> npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disae it using "--no-jetifier" flag.
Jetifier found 863 file(s) to forward-jetify. Using 12 workers...
info Starting JS server...
info Installing the app...
Task :app:processDebugMainManifest FAILED
11 actionable tasks: 11 executed
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
Unable to make field private final java.lang.String java.io.File.ph accessible: module java.base does not "opens java.io" to unnamed mule #49c3ac54
Try:
Run with --stacktrace option to get the stack trace. Run with --infor --debug option to get more log output. Run with --scan to get fullnsights.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
error Failed to install the app. Make sure you have the Android devepment environment set up: https://reactnative.dev/docs/environment-sup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevrverPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
Unable to make field private final java.lang.String java.io.File.ph accessible: module java.base does not "opens java.io" to unnamed mule #49c3ac54
get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 8s
at makeError (C:\Users\stefa\Desktop\REACT\better\node_modules\execa\index.js:174:9)
at C:\Users\stefa\Desktop\REACT\better\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Users\stefa\Desktop\REACT\better\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\stefa\Desktop\REACT\better\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
PS C:\Users\stefa\Desktop\REACT\better>
This is most probably due to the JDK being lower than JDK11.
Try Installing JDK11 by opening your project in Android Studio and then following these steps:
Open Settings and go to the Build, deployment.. option and click on the arrow to reveral Build option, click on the Build Option.
Click on the drop down list next to Gradle JDK: under Gradle projects.
Select Download JDK from the list and select Azul and JDK Version 11.
Click OK and wait for it to download and confirm the updated Java/JDK is selected and press Apply followed by OK.
////
I set jdk path in environment variables.
But the app could not be installed.
I have tried many times.
But the bugs are still there.do reply if there is any solution.
D:\React Project\MyApp>react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-
jetifier"
flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
info Installing the app...
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_66\bin
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up:
https://facebook.github.io/react-native/docs/getting-starte
d.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at checkExecSyncError (child_process.js:621:11)
at execFileSync (child_process.js:639:15)
at runOnAllDevices (D:\React Project\MyApp\node_modules\#react-native-community\cli-platform-
android\build\commands\runAndroid\runOnAllDevices.js:94:39
)
at buildAndRun (D:\React Project\MyApp\node_modules\#react-native-community\cli-platform-
android\build\commands\runAndroid\index.js:158:41)
at D:\React Project\MyApp\node_modules\#react-native-community\cli-platform-
android\build\commands\runAndroid\index.js:125:12
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async Command.handleAction (D:\React Project\MyApp\node_modules\react-
native\node_modules\#react-
native-community\cli\build\index.js:164:9)
///
Set your JAVA_HOME like This:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_66
/bin is not required.
Checkout this answer for more references.
I am trying to create react native project with following command but getting error, Help me gyus:
react-native init Sample
Following error occurs:
This will walk you through creating a new React Native project in D:\React_Demos\Sample
Using yarn v1.17.3
Installing react-native...
yarn add v1.17.3
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
error An unexpected error occurred: "https://registry.npmjs.org/react-native: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 8888".
info If you think this is a bug, please open a bug report with the information provided in "D:\React_Demos\Sample\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Error: Command failed: yarn add react-native --exact
at checkExecSyncError (child_process.js:621:11)
at execSync (child_process.js:657:15)
at run (C:\Users\sachin.salunkhe\AppData\Roaming\npm\node_modules\react-native-cli\index.js:294:5)
at createProject (C:\Users\sachin.salunkhe\AppData\Roaming\npm\node_modules\react-native-cli\index.js:249:3)
at init (C:\Users\sachin.salunkhe\AppData\Roaming\npm\node_modules\react-native-cli\index.js:200:5)
at Object. (C:\Users\sachin.salunkhe\AppData\Roaming\npm\node_modules\react-native-cli\index.js:153:7)
at Module._compile (internal/modules/cjs/loader.js:777:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:788:10)
at Module.load (internal/modules/cjs/loader.js:643:32)
at Function.Module._load (internal/modules/cjs/loader.js:556:12) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 10924,
stdout: null,
stderr: null
}
Command yarn add react-native --exact failed.
Here is the yarn.log file:
Arguments:
C:\Program Files\nodejs\node.exe C:\Users\sachin.salunkhe\AppData\Roaming\npm\node_modules\yarn\bin\yarn.js add react-native --exact
PATH:
C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\PuTTY\;C:\Users\sachin.salunkhe\AppData\Roaming\npm;C:\adb;C:\Program Files\Apache Software Foundation\apache-maven-3.5.4;\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\ProgramData\chocolatey\bin;C:\Program Files\Java\jdk1.8.0_211\bin;C:\Users\sachin.salunkhe\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Users\sachin.salunkhe\AppData\Local\Android\Sdk\emulator\;C:\Program Files (x86)\Yarn\bin\;C:\Program Files\Apache Software Foundation\apache-maven-3.5.4\bin;C:\Program Files\Java\jdk1.8.0_181\;C:\Users\sachin.salunkhe\AppData\Local\Programs\Fiddler;C:\Users\sachin.salunkhe\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\sachin.salunkhe\AppData\Local\Yarn\bin
Yarn version:
1.17.3
Node version:
12.7.0
Platform:
win32 x64
Trace:
Error: https://registry.npmjs.org/react-native: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 8888
at ClientRequest.onError (C:\Users\sachin.salunkhe\AppData\Roaming\npm\node_modules\yarn\lib\cli.js:151950:17)
at Object.onceWrapper (events.js:291:20)
at ClientRequest.emit (events.js:203:13)
at Socket.socketErrorListener (_http_client.js:399:9)
at Socket.emit (events.js:203:13)
at emitErrorNT (internal/streams/destroy.js:91:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:59:3)
at processTicksAndRejections (internal/process/task_queues.js:77:11)
npm manifest:
{"name":"Sample","version":"0.0.1","private":true,"scripts":{"start":"node node_modules/react-native/local-cli/cli.js start"}}
yarn manifest:
No manifest
Lockfile:
No lockfile
First You Can Run This Command,
sudo npm install -g react-native-cli
then after run this command,
react-native init Sample
Make sure you have carried out this course.
choco install -y nodejs.install python2 jdk8 // If there is no choco, install it.
npm install -g react-native-cli
Download and install Android Studio // and setting Configure the ANDROID_HOME environment variable. and new SDK
react-native init AwesomeProject
First, remove node modules then install it again then install react-native cli. After that run init command.
I hope this is helpful for him.
1) Remove node_modules then update react native-cli with latest version.
2) npm install
3) react-native link
4) After that this command : react-native run-android
If you navigate to your npm folder before issuing the command, it should work, then you can always move the folder.
So
cd C:\Users\User\AppData\Roaming\npm
Then run
react-native init AppName