react-native i can not run iOS - reactjs

** BUILD FAILED **
The following commands produced analyzer issues:
Analyze /Users/allen/WebstormProjects/untitled/node_modules/react-native/ReactCommon/yoga/yoga/YGNodeList.c
Analyze /Users/allen/WebstormProjects/untitled/node_modules/react-native/ReactCommon/yoga/yoga/Yoga.c
(2 commands with analyzer issues)
The following build commands failed:
PhaseScriptExecution Install\ Third\ Party /Users/allen/WebstormProjects/untitled/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/double-conversion.build/Script-190EE32F1E6A43DE00A8543A.sh
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/untitled.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/untitled.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

try this:
> rm -rf ~/.rncache
> rm -rf node_modules
> yarn install
> react-native run-ios
use yarn install replace npm install. I got the exact same error when using npm install, after try yarn install, it finally works for me.
my project dependencies:
"react": "16.0.0-alpha.12"
"react-native": "0.45.1"

Related

React Native setting.gradle solved

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '/home/dharmendra/Documents/gitlab/rnative/AwesomeProject/android/settings.gradle' (/home/dharmendra/.gradle/caches/7.5.1/scripts/6hrksilieebwgbc2tk6l5h8hd).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 63
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 30s
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 app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Could not open settings generic class cache for settings file '/home/dharmendra/Documents/gitlab/rnative/AwesomeProject/android/settings.gradle' (/home/dharmendra/.gradle/caches/7.5.1/scripts/6hrksilieebwgbc2tk6l5h8hd).
I resolved this problem final only change JAVA Version 18 Use in java of version
Check java -version :- if showing 19.x.x then change java version 18.x.x install.
follow the step :
sudo apt update
sudo apt install -y openjdk-18-jdk
sudo apt install -y openjdk-18-jre
then run your project
npx react-native start && npx react-native run-android
.............................

having an issue creating new react app with create-react-app

I am trying to create a new react project, but when I run npx create-react-app tik-tok-clone I get the following error
Creating a new React app in C:\Users\mwars\Documents\GitHub\TikTok-Clone\tik-tok-clone.
Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...
yarn add v1.22.4
[1/4] Resolving packages...
[2/4] Fetching packages...
error postcss#8.1.3: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.12.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
Aborting installation.
yarnpkg add --exact react react-dom react-scripts cra-template --cwd C:\Users\mwars\Documents\GitHub\TikTok-Clone\tik-tok-clone has failed.
Deleting generated file... package.json
Deleting generated file... yarn.lock
Deleting tik-tok-clone/ from C:\Users\mwars\Documents\GitHub\TikTok-Clone
Done.
I've been trying to figure it out for a while now and just can't get it to work.
I am was dealing with the same problem and have managed to understand and fix it. I will try to explain it below.
The issue:
error postcss#8.1.3: The engine "node" is incompatible with this module. Expected version "^10 || ^12 || >=14". Got "13.12.0"
This is telling you that the create_react_app module is only compatible with versions 10, 12, or greater than 14 of node and you are using 13.12.0.
The solution
To fix this error you need to either upgrade or downgrade your current version of node.
One way to do this is to use NVM (node version manager) to manage multiple versions of node.
To install it with either Linux or Mac you can use either of the following commands
For Wget, run the following command on the terminal:
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
For CURL, run the following:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
You will want to change the version number in the commands to the latest stable version.
Once you have downloaded it successfully restart the terminal or you won't be able to find it. If this fails you may need to reset your computer.
If you have NVM installed running the following should show you the current version of it your using.
nvm --version
You can then use the following command to list available versions of node
nvm ls-remote
Select a compatible version and install it like so
nvm install 14.15.0
Running
node -v
Should show this as your current version if not try
nvm use v14.15.0
You should now have no issues running
npx create-react-app tik-tok-clone
It worked for me after running these commands.
sudo npm cache clean -f //clear you npm cache
sudo npm install -g n install n //(this might take a while)
sudo n stable upgrade //to the current stable version

While creating React Native app: Unknown Syntax Error: Unsupported option name ("--ignore-optional")

npm install -g create-react-native-app#1.0.0 was successfully added.
create-react-native-app AppName
The error occurs while running the above command.
Unknown Syntax Error: Unsupported option name ("--ignore-optional").
$ yarn add [--json] [-E,--exact] [-T,--tilde] [-C,--caret] [-D,--dev] [-P,--peer] [-O,--optional] [--prefer-dev] [-i,--interactive] [--cached] ...
`yarnpkg add --dev --exact --ignore-optional react-native-scripts` failed
Note: yarn -v
2.1.1
use npx create-react-native-app "AppName" not npm
Ensure that the folder name of the location you are installing is correct. For example you should use "ReactNative" instead of "React Native".
Best Regards

Electron-Packager spawn ENOTDIR

I am working on a electron app, i use electron with react and threejs, now i can not build a windows application anymore. Building an Linux version or a Mac version works fine.
My npm commande is:
$ electron-packager ./build ProjectName --platform=win32 --arch=all --overwrite --packageManager=yarn --prune=true --out=out/windows --asar --icon=icon/icon.png.ico
Now i get following not saying error message.
spawn ENOTDIR
error Command failed with exit code 1.

Grunt build failing

I'm trying to build my angularjs project but i keep getting this error. I have searched for a solution but could not find one. How can i fix this error?
Thanks.
Error message
"/usr/local/bin/grunt" "clean"
>> Local Npm module "grunt-aws" not found. Is it installed?
>> Local Npm module "grunt-contrib-connect" not found. Is it installed?
Loading "Gruntfile.js" tasks...ERROR
>> Error: Unable to read ".aws.json" file (Error code: ENOENT).
>> No "clean" targets found.
Warning: Task "clean" failed. Use --force to continue.
Aborted due to warnings.
Done.
I think you need to post-install your missing dependencies before your script launches on AWS.
Try adding in your package.json the following:
"scripts": { "postinstall": "npm install" }
Or simply run npm install grunt-aws grunt-contrib-connect ... before starting your app.

Resources