Ive pulled a repo of a Ionic 2 project from a friend of my but when I do ionic Serve it is showing a white page without any errors.
I saw in my folder structure that I don't have a www/build directory and I don't know how to say that the ionic CLI has to rebuild my project.
does anyone know the command for that?
The problem is that I did not updated my npm. After I installed all the packages with npm install it worked.
Did you try using Ionic Lab to build your app?
Related
I am new to Ionic 3 and I implemented Local notifications using plugin https://ionicframework.com/docs/native/local-notifications/ and it works just as expected, but every time I push my changes and take a pull again, I need to re-install the plugin and build again.
Any solutions?
Referring to this link, the correct way to install local notification plugin for Ionic 3 is by using ionic cordova plugin add de.appplant.cordova.plugin.local-notification
Most Ionic 3 users have CLI version 3 and above. Hope this help to others too!
As mentioned in the first comment in my question itself, the problem was resolved, so I am closing this topic by posting an answer.
I got the fix, it was this line in my package.json file that was causing the problem:
"cordova-plugin-app-event": "file:node_modules/cordova-plugin-app-event"Changing the path of the plugin fixed the issue.
It's been a while since I developed in ionic ( 1 yr ). I think things have changed.
I used to be able to create a new blank template ionic project at a local folder on the mac and then replace its placeholder www folder with another project's www folder. This used to work.
Now, replacing the www folder in that ionic blank project makes no difference when I run any of these commands
ionic serve
cordova build ios
cordova emulate ios
I keep seeing the "The world is your oyster" message.
In fact, when I even renamed the local folder that was holding the entire ionic project, the cordova build ios still has worked without any complaints.
Clearly, the code is running somewhere else.
I also notice this at the terminal prompt:
➜ vb git:(master)
Here the git:(master) thing is new to me. Could this be the culprit?
If so, how can I disassociate the github aspect so I can work on the local and quickly test the changes I will be making in the local www as easy as going cordova build ios?
The problem was that when I created the blank project, I used the defaults which now outputs an ionic 2 baby.
I did the following 2 changes to solve my problem.
create my app for version 1 by appending --type=ionic1 as follows:
ionic cordova start myapp -blank --type=ionic1
I also prefixed allmy cordova commands with ionic name space.
Now I can replace the www all day long and my ionic cordova build ios & ionic cordova emulate ios will comply.
hope it will help someone.
I am new to Ionic, I have installed my ionic to C:\Users\myname, now I don't install ionic under user name folder, because it make my folder mess and i want to put them to one directory, meanwhile, i don't want to uninstall my ionic and corvoda and install them again !
does anyone have any solution for this.
Thanks
Install ionic and cordova using npm repository globally.First install node.js and follow the below instructions https://ionicframework.com/getting-started/
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
I am new to Ionic and just getting used to it. However I have noticed that when I create an app files are download from github such as:
Downloading:
https://github.com/driftyco/ionic-app-base/archive/master.zip
Often working without internet access is there a way that files I might need can be downloaded once and stored locally?
Yes, you can avoid downloading it with each new app. When you wrote something like to
$ ionic start YourAppName tabs
tabs - is an alias to Ionic starter repository. You can replace with relative or absolute path to a local directory.
Check out more about start parameters there - Starting an Ionic App.
EDIT: I don't see a reason why the code below couldn't work. And Yes, you have to unpack your default app files to some folder.
$ ionic start YourAppName c:\Temp\ionic-app-base-master
The command ionic start myApp will always create your project with the latest version of Ionic. It will always download the github. Currently there is no how to create a new project without using the downlod of the github.
You can create a blank project and uses it as "boilerplate project" (ionic start myApp blank). Then, when necessary, to update the Ionic (newest version) go to the root of your project and run ionic lib update.
Just download all the templates once and use it whenever you need when you are offline. Ionic will always download latest bundle when you do:
ionic start MyApp