-
Notifications
You must be signed in to change notification settings - Fork 336
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warnings and Aborts when performing 'grunt serve' command #99
Comments
Reported a GitHub Issue to the creators at diegonetto/generator-ionic#99
@ltfschoen Thank you for the very detailed writeup! I was able to replicate this issue, and am investigating it right now. Hope to have a fix by later today. |
@ltfschoen can you please update to the latest version and give this another go to verify the fix in version Thanks! |
@diegonetto I reinstalled NPM, updated to the latest Generator Ionic version and ran the following commands:
It all works fine but it gives me a Warning: "npm WARN package.json YeomanIonic@0.0.0 No repository field." (see at the bottom of this Screenshot). Is this a problem? Note the Line 1 of the Grunfile.js states:
Lines 1-3 of package.json states
When I then proceed to run the server with the following command I do not get any warnings (I don't have to run 'grunt serve --force' anymore, which is great!). All "green" 👍 (see this Screenshot)
Now, I decided to add the iOS platform and emulate it with the following commands (described in the "Cordova Commands" section of the Readme), which didn't give any errors, and just loaded the iOS Simulator with the Apache Cordova logo
I then realised I need to built it first, so I ran the command, which gave me the following Warning (similar to the ones experienced earlier)
After doing all this I realised there is an "Initial Walkthrough" in the Readme, with slightly different commands, so I tested it out with:
I tried changing the title in /app/index.html to the following, which updated straight away:
I then wanted to change the CSS of this title (of class .title), and noticed that in the /app/styles/ directory there are two files, so I added the following to each of them to see if I could change the font colour, but it didn't work (I know it was detecting the Sass file in the browser somehow, because if I used the wrong syntax it would display): main.sass
main.scss
I noticed that in /app/index.html, on Line 17, it references "/styles/main.css", which is a file that doesn't exist. I tried changing it to the Sass and SCSS file extensions but it didn't work either
This didn't display anything differently either. I am using the Google Chrome browser, and opened Inspect Element > Network, where it was clearly being loaded (see below Screenshot). This also exposed another potential bug in that it is loading a 'cordova.js' file that cannot be found as is giving 404 error. As a final step following the "Initial Walkthrough" in the Readme, I ran the following command and the Build succeeded
It gave a few Warnings as shown in below screenshots: The iOS platform had already been added so I skipped running 'grunt platform:add:ios'.
|
@ltfschoen The first set of warnings you mentioned are referring to your project's You can go ahead and delete either the You are correct that There has been some confusion about the
This should be working correctly (just spot checked on a fresh scaffold of the |
@ltfschoen The
Then try scaffolding a new project. |
@diegonetto I followed your recommended workflow and now it actually displays the map in iOS Simulator 👍 I'm going to stick with SASS too, I haven't managed to get it to work, but I'm sure I'll work it out soon. I also spent the afternoon trying to get it to emulate in the Android Simulator, and I managed to get it to work, so I'll make a pull request to add a workflow to your Readme for your consideration. |
@ltfschoen glad you were able to get the starter working! SASS should be working out of the box now. Can you revert any changes to the usemin blocks inside I verified this morning that if you scaffold a new project with the Renaming
Thanks for submitting the PR with your guide on setting up the Android Emulator. Since the main README is starting to get very long, I'm going to be adding a FAQ page to the documentation for this generator, so I will comment on your PR when I have restructured the docs so you can add adjust it accordingly. Thanks! |
@diegonetto I created a fresh project with the same settings. I checked instances of the wiredep object in the Gruntfile and they appear the same as my existing project, stored here: https://github.com/ltfschoen/yeoman_ionic/blob/master/Gruntfile.js I created a YouTube video of my testing SCSS and Sass and emulating iOS and Android here (it all took about 10 minutes longer than this clip, but I removed long delays in Adobe Premiere): Note that I have since discovered that the reason why I couldn't change the font colour of my custom title text "Map for Luke" having the "title" class (.title) with the following command, was because it inherits from classes ".bar.bar-stable":
So, in order to change the font colour of the title I had to change the code to:
I discovered this was the reason when I checked using the "Element" and "Styles" tabls of Dev Tools in Google Chrome, which shows this is due to inheritance from ionic.css that needs to be fully overridden this way to work. Screenshot AFTER IN-BROWSER (notice I have added the "color" and "background-color" attributes to classes ".bar.bar-stable .title" in the "Styles" tab, and the different colours (orange and red) are shown in the title section of the webpage, whilst further down in the "Styles" tab where I have added a "color" of purple to class ".bar .title" appears insufficient to override the inherited font colour, and it indicates this is the situation with a strike-through) FAQ definitely sounds like the right approach. Please keep me informed! |
@ltfschoen Glad you were able to get your style overrides working!! This is often the case when using frameworks with large amounts of custom styles (Twitter Bootstrap, Zurb Foundation, TopCoat, etc). Does it suffice to say, then, that the original problem reported in this issue has been resolved? If so, please close this issue, otherwise let me know how I can be of further assistance. Thanks :) |
Yes, absolutely. This fixes #99. |
Workflow that causes warnings and aborts when running 'grunt serve' and attempts to resolve them with limited success
#1) Followed the steps in Readme file under the title "Usage" at https://github.com/diegonetto/generator-ionic, including:
Your skeleton is almost empty...why share this? #2) First Attempt to Solve the Problem
#3) Second Attempt to Solve the Problem
error on 'yo ionicjs' #4) Third Attempt to Solve the Problem
sass through compass, concurrent, autoprefixer #5) Fourth Attempt to Solve the Problem
To try and resolve them I tried the following:
https://github.com/gruntjs/grunt-contrib-compass
the code in the file where it triggered the error states the following (but I don't know how to tackle this problem)
2-spaces indentation, added vendor folder with README.md, updated Gruntf... #6) Final Questions:
The outcome of my attempts to close out all the warnings that are displayed when running 'grunt serve --force' is that:
a) I don't know how to resolve the following Warnings from displaying still (i.e. wiredep pointing to a 'bower.json' location that wasn't generated even though I followed the Generator Ionic Setup instructions, and some unknown error associated with Compass import paths). Will they impact my ability to use Generator Ionic effectively? Is anyone able to give me any tips on how to overcome these remaining issues?
b) Do these bugs appear to be a common issue that other people would encounter if they tried to install Generator Ionic? Will anyone work on resolving them? Are there any quick fixes or instructions (or updates to the Readme file) that could be prepared in the interim?
Note: Computer being used
OSX 10.9.3
Ruby v2.1.2
The text was updated successfully, but these errors were encountered: