I don't understand why my npm make that and i'm new with react-native.
Here is the description of my "bug" on Windows 10 :
I can use react-native command for run android or create react-native app like that react-native init TestApp
When i go into my app folder with cd TestApp
and i run react-native link
or other react-native command everythings work fine.
But if i install a new package like fbsdk with npm like that npm install react-native-fbsdk --save
i saw after installation this message :
added 1 package and removed 639 packages in 22.207s
And after that, if i would like use react-native command i have this message :
Command
link
unrecognized. Make sure that you have runnpm install
and that you are inside a react-native project.
For this message, i have entered react-native link
command.
You know why npm remove all my packages ?
Using the --no-save will tell npm not to remove the package from your package. json , npm-shrinkwrap. json , or package-lock. json files.
You can install a particular version of the library by running npm install <library-name>@<version-number> , for example: npm install @react-native-community/netinfo@^2.0.
Hence you are right to be here. I will explain every topic with an example with minimum complexity that helps you to build a cross-platform application with a backend. ⇒ In this example , we will use React Native(for App), Node. Js(Backend API), & MongoDB(for database).
I got the same problem.
However I solved the problem by deleting the package-lock.json
and then running npm install
.
Check the answer here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With