Expo issue when running app for the first time - react-native

I'm using Expo CLI to create my first react-native app, I installed Expo globally and npm modules too, but when I start my app using "expo start" or "npm start" the page give me this error "Expo Developer Tools is disconnected from Expo CLI. Use the expo start command to start the CLI again."
I tryed to install watchman but I can't install it, what can I do? I have Mac OS.

Try re-installing the Expo CLI, by running:
npm uninstall -g expo-cli && npm install -g expo-cli

Related

Yarn is Installed globally but not working properly

I am using a Windows 10 device.
I have installed Yarn globally and when I use
npm list -g it shows that Yarn is installed
But yarn --version returns
bash: yarn: command not found
While npx yarn --version responded with the version 1.22.18
The problem is, I don't want to keep adding npx each time I want to run a yarn command

'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

Errors when running npm install -g create-react-app in ubuntu 20.04

So i'm trying to install react native in ubuntu 20.04, and i'm following this guide https://www.techomoro.com/install-and-setup-a-react-app-on-ubuntu/ , but when running "-g create-react-app" the terminal gives me these problems https://imgur.com/a/1tijndK , how do i solve them? i have node and npm installed (see the picture)
You npm version is suitable for this:
npx create-react-app your-app-name
npx command uses create-react-app without downloading it as global.
If you already added the create-react-app globally, uninstall it first.
#issue with npm
Try following command,
npx install create-react-app -g
npx create-react-app my-app
cd my-app
npm start
Sometimes the npm install doesn't work.
https://create-react-app.dev/docs/getting-started/
This seems like a an administrative access issues.
Trying running:
$sudo npx create-react-app my-app
It will ask you for the administrators password, fill that in and it should be up and running.

cant seem to get reactnative app created on ubuntu keep getting error: Cannot find module 'fs-minipass'

Can't create react native application on terminal
expo init first_project
Cannot find module f_s mini_pass
It's possible that you installed create-react-native-app and expo-cli. And assuming you are using linux.
First uninstall both:
sudo npm -g uninstall expo-cli --save
sudo npm -g uninstall create-react-native-app --save
and then you just install expo-cli:
sudo install -g expo-cli
You can now create a new app:
expo init Awesome-app
It should work now.

Uninstalling Expo CLI

I have installed Expo CLI globally and cant start a new react native app without using expo cli and therefore would like to uninstall it from my system. I have spent hours trying to work out how to removeit globally from my system
To completely uninstall expo cli
On Windows
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd %USERPROFILE% && rmdir /Q /S .expo
On Mac OS Catalina
The first step npm -g uninstall expo-cli --save (also yarn global remove expo-cli if you use yarn).
Second cd ~ && rm -rf .expo
Thanks to #Александр Наумкин and #Liko for editing and comments
npm -g uninstall expo-cli --save did not work for me, but yarn global remove expo-cli did.
I expected the npm option to work, and was surprised when it didn't. I am using nvm, and wonder if this answer explains why the npm option didn't work for me.
I had the same problem and after searching I found this command:
npm -g uninstall expo-cli --save
finally expo-cli is deleted from my pc but it still asks about it every time I type create-react-native-app. if anybody knows how to go on from here be my guest.
and I hope this helps you
edit: if you use react-native init it is almost the same as create-react-native-app without expo-cli. This is how I chose to carry on as using the create command with expo-cli gives the application error after error if you install any api.
if you are using npm then this command will work for uninstalling expo cli
npm -g uninstall expo-cli --save
I had the same problem once, i have tried
npm -g uninstall expo-cli
but after the my problem didn't get solved, i have searched lot even after that problem did't get solved,
i am also using yarn so finally i have decided to remove using the yarn
i tried
yarn global remove expo-cli
This indeed solved my issue
If you are using nvm.
search for node version with expo installed.
find ~/.nvm -name "*expo*" -type d
nvm use {nodeversion}
npm -g uninstall expo-cli
If yarn don't work for you or you prefer using npm use:
npm rm -g expo cli
Very simple to uninstall a npm package.
Just enter this command :
npm uninstall -g expo-cli
In Windows 10 npm uninstall -g expo-cli --save worked for me from nodejs console, opening it as administrator
In windows 10 to uninstall :
npm uninstall -g expo-cli --save
yarn remove global expo-cli
Worked for me.
After that, for install last version then:
npm install -g expo-cli --save
expo-cli --version
3.21.13
I had this issue.
My steps
npm cache clean --force
npx install create-react-native-app
cd
npm install -g expo-cli
expo start
If you get error at 4 about node.js just install latest version. Then
Open your package.json file and add:
"react-navigation": "git://github.com/Snailapp/react-navigation.git#2.18.5"
npm install
Ok, in addition to existing answers, with commands like npm -g uninstall expo-cli and deleting manually .expo folder inside %USER% i try expo whoami, and my output was:
$ expo whoami
There is a new version of expo-cli available (4.13.0).
You are currently using expo-cli 3.23.3
Install expo-cli globally using the package manager of your choice;
for example: npm install -g expo-cli to get the latest version
[13:13:03] › Not logged in, run expo login to authenticate
So i had to do a bit more manual work:
%USER%\AppData\local and deleted expo folder
went to %USER%\AppData\Roaming\npm folder and manually deleted expo related files
After that i did expo whoami and output is:
$ expo whoami
bash: /c/Users/User/AppData/Roaming/npm/expo: No such file or directory
Finally, i opened new command prompt and did npm i --g expo-cli and after installation with expo -V i get 4.13.0.
I had the same issue
i unistalled using
npm uninstall expo-cli
or
npm unistall -g expo-cli