Cannot install react-native - react-native

I want to learn React Native but I cannot figure out how to install it. It gives me this error message.
command: npm install -g expo-cli //installing react-native?
error: npm ERR! cb.apply is not a function.
Can anyone help? Thanks.

Did you install node? It seems that npm is not installed on your machine, which comes with node. Here is the link to the download page

Related

ERESOLVE unable to resolve dependency tree while installing a pacakge in my expo account

I have existing project, I update my SDK Version from 41 to 44 by following these steps.
1)Update to the latest version of Expo CLI: npm i -g expo-cli. expo-cli#5.4.3 or greater is required.
2)Run expo upgrade in your project directory.
After that I run expo start but got this error
Unable to find expo in this project - have you run yarn / npm install yet?
Than I try to run npm install and getting this error
ERESOLVE unable to resolve dependency tree while installing a pacakge
[enter image description here][1]
I am using Mac
[1]: https://i.stack.imgur.com/D6hhN.png
When you updated your SDK, it looks like npm could not resolve the dependency: #react-native-community/masked-view
You can try to run: npm uninstall #react-native-community/masked-view and then re-try npm install.
What may make things easier is to just give your dependency tree a good ol' refresh.
Delete node_modules and package-lock.json
re-run npm install in the ROOT of your project.
Triple check you are in the correct spot when running these commands.

Unable to install npm in react-native

I try to install npm in react-native however it gives me this error:
i can install npms in other project but i cant install for this project why ?

I can't install anything with npm command line

I have been using npm for some time with ionic. Recently, it started giving an error when trying to install anything both packages and modules. Even with react native it gives the same error.
I have tried re-installing it, but that didn't fix it. I created a new user on my Windows system, but it's still not working, and I noticed that when I search for the error code on Google, I get no results.
C:\WINDOWS\system32>npm install -g ionic
npm ERR! error:0909006C:PEM routines:get_name:no start line
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\OLAMIDE AWOBUSUYI\AppData\Roaming\npm-cache_logs\2019-07-11T19_47_18_673Z-debug.logenter image description here
Try to set the npm registry:
npm set registry http://registry.npmjs.org/

Where and How should I add AsyncStorage with React Native 0.59?

I just upgraded to react-native 0.59.0-rc.3 and I'm getting a warning about AsyncStorage that will be removed from react-native and added to #react-native-community/async-storage.
But in the #react-native-community/async-storage it only says how to link it, but not how to install it
e.g npm install some_package
Where Should I install it from?
npm install react-native-community and just import it from that?
npm install #react-native-community/async-storage?
As it states on the repo
# Install
$ yarn add #react-native-community/async-storage
Usually if a dependency is available with yarn it is available with npm
However, if you are using npm instead of yarn you can install it with
npm i #react-native-community/async-storage
yarn and npm are both package managers. Choose one and stick with it.
To see if a package is available for npm you can search on https://www.npmjs.com
As you can see from the below link that it is on npm and can be installed using npm i.
https://www.npmjs.com/package/#react-native-community/async-storage
The NPM package is #react-native-community/async-storage.
Have a look at the NPM page for it

How can I upgrade npm if npm is broken?

I am on Ubuntu 12.04 and installed npm via the automatic script and it installed 1.1.17. I am now getting the following error message when trying to install anything via npm: "npm ERR! TypeError: Arguments to path.resolve must be strings" I found a post stating a solution to my problem is to upgrade to 1.2.15 however I cannot figure out how to do that as updating via npm is throwing an error. How can I update npm without using npm?
I uninstall node and reinstall to fix this problem.