npx react-native init , not creating project - react-native

when I run new project command it shows me an error
npx react-native init AwesomProject
npm ERR! Could not install from "computer\AppData\Roaming\npm-cache_npx\15660" as it does not contain a package.json file.

try this : npm uninstall -g react-native-cli #react-native-community/cli
or
use Expo

Related

react-native init is empty upon creation

i'm upgrading to react-native to the latest.
I'm following this https://reactnative.dev/docs/0.68/environment-setup
with current setup
ruby 2.7.5 (using rvm)
gem 3.1.6
node 14
after running this command
npx react-native init AwesomeProject
I only got this on my folder
Thank you.
Sorry,
I just fixed it by reinstalling these
npm uninstall -g react-native
npm uninstall -g react-native-cli
npm install -g react-native-cli
npm install -g react-native

When I open a new react-native project I always get this error

enter image description here
enter image description here
If you have installed react-native-cli globally uninstall using
npm uninstall -g react-native
npm uninstall -g react-native-cli
and then install again using
npm uninstall -g react-native
npm uninstall -g react-native-cli
This error is specifically for 0.69.0 version. You can also do
npx react-native init ProjectName --version="0.68.2"

'cb.apply is not a function' error running 'npx react-native init'

I want to learn React Native, so i read documents in Offical Site and I install some softwares. I installed JDK, Android Studio, NodeJs, Watchman..
At the least, When i use this command:
npx react-native init AwesomeProject
I got error:
npm ERR! cb.apply is not a function
I tried to graceful, but it didn't work.
npm install graceful-fs --save-dev
So what should I do ?
I'm using Linux Mint 18.
you most install npm:
install npm
than install react-native :
npm install -g
react-native-cli && npm install -g react-native (admin or sudo)
then for create project use:
react-native init MyProject
than go to project folder with :
cd Myproject
and finally use this for run project:
react-native run-ios or run-android

Why does react-native uinstall after running react-native command to install a package?

I installed react-native globally and confirmed installation on Windows 10. Then I ran react-native command in PowerShell to install materials-kit and vector-icons. The installation of these packages failed and the directory is no longer considered a react-native project directory. I have to reinstall react-native as a result.
How can I install materials-kit and vector-icons without causing the system to uninstall react-native?
Steps Taken
I ran the below code in PowerShell. Please Note: I also used MS Visual Code and the Terminal in MS Studio Code.
Input
npm install -g react-native-cli
react-native -version
Output
react-native-cli: 2.0.1
react-native: 0.59.5
Additional Input
npm install --save react-native-material-kit react-native-vector-icons
react-native -version
Additional Ouput
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
I was expecting these two react-native packages to be installed. Did not happen.
Extra Information: Error Code Snippet
...
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall rename
...
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
you have to create a project with the react-native-cli then add your required packages there.
so the steps should be like this:
install the cli tool as you've done it very well.
npm install -g react-native-cli
create a project (you need to provide a name for it).
react-native init *<project_name>*
change your current directory to the created project
cd *<project_name>*
install your favorite packages.
npm install --save react-native-material-kit react-native-vector-icons
run the react-native packager for your target platform (ios or android)
react-native run-ios
or
`react-native run-android`
happy coding!
I solved the program by starting again with no active react-native directory.
1. decided to use Expo to expedite the react-native application set-up process
npm install expo-cli --global
2. initialised new project && changed directory
expo init cra
cd cra
3. installed the react-native material-kit and vector-icons packages individually using yarn instead of npm
yarn add react-native-material-kit
yarn add react-native-vector-icons
4.confirmed installation
Input
react-native -version
Output
react-native-cli: 2.0.1
react-native: 0.57.1

npm error while creating react native app

I used following command
npm install -g create-react-native-app
create-react-native-app AwesomeProject
cd AwesomeProject
npm start
but it showing me following error.
anyone can help?
Update your:
Node version to the latest
npm (npm install -g npm#latest)
yarn (npm install --g yarn).
And try again to run create-react-native-app AwesomeProject