Ionic 2 app not installing #ionic-native/network - ionic-framework

I'm trying to use cordova-plugin-network-information and #ionic-native/network in my ionic 2 app. However, I get the following error when trying to execute npm install --save #ionic-native/network.
npm WARN #ionic-native/network#3.8.1 requires a peer of #ionic-native/core#^3.6.0 but none was installed.
npm WARN #ionic-native/network#3.8.1 requires a peer of rxjs#^5.0.1 but none was installed.
How do I fix this? Do I need to upgrade to ionic 3?

You need to install ionic native 3.x. Seems you are using ionic native 2.x. please update your package.json. It should work. if I am not mistaken, the latest version is 3.6.1. please follow below guide for more details. Kindly note that it require quite some changes to migrate to ionic native 3.x but thing is you get to mock them which is supported in the browser.
https://github.com/driftyco/ionic-native/blob/master/README.md
Ashley

Most of the time we see warnings in our projects. However, these should not affect your application. But, as Ashley suggested, update your application to the latest version to ensure everything is working as it should.

Please use as root/admin if on ubuntu try this
sudo npm install
if on windows
open cmd as administrator

Related

Installing plugin the Capacitor way still requires the Cordova plugin

When I install for example the Insomnia plugin the Capacitor way like so:
npm install cordova-plugin-insomnia
npm install #ionic-native/insomnia
ionic cap sync
It still requires me to install the cordova plugin like this:
ionic cordova plugin add cordova-plugin-insomnia
In order to work. Otherwise it says: plugin_not_installed
My steps to make it work are:
Step 1: Add Insomnia to providers (#ionic-native/insomnia/ngx)
Step 2: Inject Insomnia within the constructor private insomnia: Insomnia
Am I forgetting something or do I just really need to ionic cordova plugin add for plugins that are not fully supported yet?
Probably obvious for most but just in case someone else might face this problem..
When you use capacitor you shouldn't start your server with ionic cordova run or ionic cordova build anymore.
Obviously you need to start it this way for livereload:
ionic cap run android -l --external
ionic cap run ios -l --external
That is because your application is using cordova and not capacitor..
Remove your platforms folder, and just to make sure and remove unnecessary cordova files which will increase your app size, remove cordova-android and cordova-ios from your package.json.. You do not need that for running your app based on capacitor.
Then, run this command.
ionic build
npx cap add android
npx cap add ios
For each successive build, in case you add or remove a plugin, use npx cap sync
Otherwise use npx cap copy
Reference Docs

How can I use ionic storage with capacitor?

I am developing an android app using ionic, and instead of cordova I am using capacitor. When I try to run ionic cordova plugin add cordova-sqlite-storage command, it gives me warning [WARN] About to integrate your app with Cordova. Are you sure you want to continue?. Please refer the warning image.
I am not sure, should I press yes or no. I want to use capacitor.
You should continue to use the Cordova plugin. The problem is how you're adding it. Don't use the ionic cordova CLI command (as in don't ever use it in a Capacitor app). Instead, use npm install cordova-sqlite-storage and then update your Capacitor platform with npx cap sync or ionic cap sync.
I think you need to use capacitor-sqlite plugin for your application.
npm install --save capacitor-sqlite#latest
Here you can see the list of plugins that are available with a capacitor.
Capacitor Community Plugins
If you don't have complex queries in your application and simple storage only then you can use storage API.
Hope this will help you.

How do I upgrade my Ionic 4 app to the latests Ionic version?

I developed an Ionic 4 app. In my package.json it says
"#ionic/angular": "^4.1.0"
Since there where several bug fixes I would like to update the app to 4.4.0
What do I have to do?
Always make sure to check the CHANGELOG first to see if there're breaking changes in that version.
After that, go to the project's folder and run npm install #ionic/angular#4.4.0 --save to install the 4.4.0 version of Ionic Angular.
Once that finishes, you should be able to see the new version in your package.json file.

Ionic CLI break with Internet connection

I am facing a problem in ionic to start a new ionic project or serve ionic project while Internet connection in on.
In Command Prompt no error come but CLI break after a few seconds. But without an Internet connection it works perfectly, mean without an Internet connection I can serve the ionic project (ionic serve). But to start a new project we have to connect our laptop to the Internet connection and with the connection, I have this problem. I have reinstalled the ionic but still, I'm facing this problem.
This is the image of process of ionic serve with Internet connection
Problem Solved!
first we have to uninstall ionic
npm uninstall -g ionic cordova
still ionic has not completely uninstalled. To do the same we have to delete all ionic files in our windows drive (Local Disk :c).
then we have to uninstall nodejs from control panel.
still node and npm has not uninstalled completely so we also have to delete all node and npm files from c drive.
now install nodejs recommended and the ionic
npm install -g ionic cordova
It will work now....
The server doesn't start up. You should get a lot more processes showing after the
webpack started ...
like sass, postprocess, lint, build etc.
To find out the possible error you can use the verbose switch which may help show what the error is.
$ ionic serve --verbose
Please try that and see what the output is.

rnpm command not found after "sudo npm install rnpm -g"

I am still new to coding and I ran into a weird problem.
I am trying to use the facebook SDK in my react native app and I was following the tutorials for installing rnpm. However, after I installed rnpm package the "rnpm" command is still unusable. Can someone point out what I did wrong? I already installed the package globally.
Since last November, rnpm is part of the React Native core, so you don't need to install rnpm anymore. You can run directly 'react-native link' to link the dependencies that you instal using npm.
You need to install npm on your macbook
issue
sudo port install npm
https://medium.com/#samthor/installing-npm-on-mac-os-x-with-macports-27e9f380ffb7#.58c58rzca