npm install --global ... and
npm install -g ... and
npm i -g ... are all the same.
Unfortunately it seems that things have been a bit unstable on Windows recently because of a combination a of node 13.x issue and a dependency of Expo not having precompiled binaries for node 13.
Also, the warnings you get when installing expo-cli (on all platforms) just obscure any problems if there are any. This is a known problem, but not easy to solve apparently.
For installing expo-cli using npm should be fine, but I see you’re using yarn to install the dependencies in your project. That’s also perfectly fine. But you should not mix the two when installing dependencies.
npm install inside your project without the
--global options would install your dependencies as specified in
package.json and create a
yarn would install your dependencies and create a
You should never have both of these lock files. Since you’re using yarn to install your dependencies and to start the dev server/bundler you should make sure you delete
package-lock.json and never run
npm without the
--global options inside your project.
If you do currently have a
package-lock.json file, delete it and
node_modules again and run
Then try the following before trying
yarn start actually just runs
expo start anyway as specified in your
package.json's “scripts” section.)
- Delete anything in your temp directory called
- Delete the
.expo directory within your project. It will be recreated when you run
expo start (or
expo start -c)
expo start -c
I hope that sorts it out.
By the way, is this an app you have done any work on yet, or did you not get further than
expo init? If the latter then you can also try creating a new project with
expo init and paste the whole output here if it still gives you problems.