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.
Related
I want to run one of the ionic project from mac to windows but I have error while doing npm install it does not generate node_modules too. Can someone help me or have any idea with this? I already tried upgrading all the versions to the latest and also downgrade node from 16 to 14 and ionic6 to ionic 4 but its still the same. Here is the error, I also tried downloading node-gyp Here is the error
The 4th last line of the logs has your answer. Node hasn't been properly installed on the machine or the incorrect command is being used.
Verify the installation & commands.
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
When I'm trying to create a simple ionic app with 'ionic start' command, I see that ionic downloads a base app and the template indicated, but then I see 'Installing npm packages...' and it that never ends it's process (I have waited hours).
Ionic creates the myapp folder with files within it, but I don't know if it finally creates the ionic app to work with. If I put 'ionic serve' there is nothing on screen, even if I choose the tabs template.. or an error 'couldn't find ionic.config.json file'
is it a firewall issue? anyone has faced with this?
You must update your ionic to beta version using:
npm install -g ionic#beta
my ionic project works fine with ionic serve --lab ,but while copied the.apk file in build folder to my phone and install the app but blank screen appears ,
Please can anyone suggest what might be my problem
my app is using google maps,key is provieded for both app and browser in index.html
Have you tried running it in the emulator ? Since its much easier to see the error logs . Try ionic emulate android -l or ios -l (whichever OS you are building for) and then once the execution starts run the command consolelogs it will log all the activity and you will have a better understanding about why its not working.
+1 for using Chrome Remote Debugging feature. It give you the same output as you would receive from running you app in the browser.
Additionally, I have found that sometimes if your app is already compiled, the ionic CLI doesnt always copy your current files into the APK, and uses the older cached files instead. If you are banging your head against the wall, run the following commands to make sure you have your latest code in your APK.
ionic platform remove android
ionic platform add android
ionic run android
I suggest you use the Chrome Remote Debugging feature. I encountered the same, and looked for answers to my symptom for hours. Once I connected to the chrome remote debugger, I got the console.log back, and noticed there was a problem in my routing setup.
It was a problem with ionic CLI. I've updated it to the latest and reinstalled all dependencies.
I tried to use live reload feature with ionic serve and ionic emulate ios --livereload. Server starts well, application is displayed on simulator (or in browser) and it works smoothly.
When I change a file (a js or html in www directory) and save it, console write HTML changed: www/index.html for example, but application doesn't reload itself as it should be.
I supposed that websocket between server and app could be broken, but when I kill the server (Ctrl-C), web inspector immediatly fire the following error :
[Error] WebSocket network error: The operation couldn’t be completed. Connection refused (192.168.5.2, line 0, x4)
So I supposed that there is no issue with websocket. Moreover, it is displayed with no error in Network pane of web inspector.
Is there something I missed to made livereload work ?
My configuration :
Cordova CLI: 5.0.0
Ionic Version: 1.0.0
Ionic CLI Version: 1.4.5
Ionic App Lib Version: 0.0.22
ios-deploy version: 1.7.0
ios-sim version: 3.1.1
OS: Mac OS X Yosemite
Node Version: v0.10.30
Xcode version: Xcode 6.3.2 Build version 6D2105
Don't hesitate to ask me for clarification if something is not clear.
Edit
I also tested it without Internet connection at all to check if it was a firewall issue or something like that, but it changes nothing.
Try running ionic address and selecting the correct interface.
If it doesn't work and it's iOS 9, it may be an issue with Apple ATS:
https://github.com/driftyco/ionic-cli/issues/605
It could also be a CORS issue. In this case, try installing the cordova-white-list plugin.
I solved this doing this:
Go to https://update.ionic.zone/
Copy the content of your package.json in the input tab.
Then click in the update button
Copy the content of the output tab and paste replacing the content of your package.json
Save the file, and run npm install
When the updates are finish just run ionic serve and it should be works fine again
;)
I have faced such a problem, tried a fresh new app, worked perfectly, tried another old app, also worked perfectly.
Tried to stop using some modules (clipboard in my case and another one), solved the problem, in my case it was an error in the way I am importing or using it.
Hope this will help someone