whenever I try to start a new project with npx react-native init command I get the following error:
> error Error: Command failed: yarn init -y
> Usage: yarn [options]
>
> yarn: error: no such option: -y
I have linux mint OS and when I try to create a new react natove app with expo everything works fine., when I try to run same command with sudo but then I got
sh: 1: react-native: Permission denied
I have linux mint OS and when I try to create a new react native app with expo everything works fine. I have 16.17.1 version of Node and I tried to remove react native CLI and reinstalling it but couldn't sort this problem out. What causes this error and how can I solve this problem?
okay seems like I had old version of yarn after updating yarn to the last version I solved the problem.
Related
I'm trying to create a new Typescript/React project and am running into the following error:
Installing template dependencies using yarnpkg...
yarn add v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
error expect#29.0.2: The engine "node" is incompatible with this module. Expected version "^14.15.0 || ^16.10.0 || >=18.0.0". Got "17.4.0"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.
`yarnpkg add #testing-library/jest-dom#^5.14.1 #testing-library/react#^13.0.0 #testing-library/user-event#^13.2.1 web-vitals#^2.1.0` failed
Done in 25.21s.
To create my react project, I'm running the following command yarn create react-app my-app --template typescript per the Create React App docs.
Any help would be appreciated.
My version of node was oudated. I upgraded yarn and node using:
nvm install node --reinstall-packages-from=node
yarn install -g
It is showing this error, i'm using npx still it is showing using yarn, npx is working fine when i'm using it for react app
It should provide me the next app starter
A temporary fix might be "npx create-next-app#latest --use-npm", so that creat-next-app will use npm instead of yarn while installing.
Installed the expo cli using
"npm install -g expo-cli" and create a project
expo init AwesomeProject.
I have the android emulator running ,see the installed version in the image
but when i try to run the expo project using "npm run android" getting error as
Couldn't start project on Android: Error running adb: unable to get local issuer certificate
can any one help me on this thanks..
SDK tools
Have you followed the guide on:
https://docs.expo.io/workflow/android-studio-emulator/
Can you run adb from your terminal?
$adb version
i'm trying to run react native app on android with this command npx react-native run-android
but i am getting this error every time:
Failed to parse React Native CLI configuration. Expected running 'npx.cmd --quiet --no-install react-native config' command from 'C:\Users\UserName\Desktop\AppName' directory to output valid JSON, but it didn't. This may be caused by npx resolving to a legacy global react-native binary. Please make sure to uninstall any global 'react-native' binaries: 'npm uninstall -g react-native react-native-cli' and try again
**
how can I fix this ?
have u installed react native cli and react native globally?
When I try to create a new React Native project with:
react-native init projectname
and I open . xcworkspace & hit run
=> error:
'cxxreact/ModuleRegistry.h' file not found
or
react-native init projectname
react-native run-ios
=> error:
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening testproj060.xcworkspace. Run CLI with --verbose flag for more details. ** BUILD FAILED **
This is pod installation issue use below steps
brew insatll cocoapods
cd projectName/ios
pod install
cd .. & react-native run-ios