When i run ionic serve my app loads but all my styles are missing.
I get a 404 response in the dom console which reads:
Failed to load resource: the server responded with a status of 404 (Not Found)
Indicating that /build/css/app.ios.css is missing.
I then check my app and there is no css files or a css folder.
The only thing i can think of that might have done this is running ‘ionic build’ would that affect anything?
Note to help others
I ran gulp build
from root of project through terminal, that then generated the css directory and files again.
I think went through and fixed a few javascript errors.
1 Like
Hmm, sounds like this could be an outdated CLI not running the commands.
Make sure you have the latest beta CLI installed
npm i -g ionic@beta
I’m experiencing the same issue. I run
again just to make sure I have the latest version.
gives me 2.0.0-beta.25. Is it correct version?
In any case, css is still missing from build directory.
Any advise?
This is new project? If not, may be you need create new and copy your files.
Well, I use git with remote repository. So, it works well on one computer (with local repository), but when I clone the repository on other computer, I get this problem.
My .gitignore is as following:
node_modules/
www/build/
platforms/
plugins/
.DS_Store
After cloning the repository I had to run “npm install” to install node_modules.
I also noticed there is this error when I run “ionic serve”:
Error: Import directives may not be used within control directives or mixins.
on line 34 of node_modules/ionic-angular/components.core.scss
@import “fonts/ionicons”;
–^
ah, you have old Ionic version. It fixed on beta.6 (latest)
or you can remove if from node_modules/ionic-angular/components.core.scss file
Thanks @xr0master !
Another question though:
After I run
the installed version of ionic I get is 2.0.0-beta.25. What should I do to install beta 6?
It is Ionic CLI
you need update ionic-angular package. However Ionic Team have been changed some things, so it’s not easy )
Hello Ionites! Migration guide extraordinaire @iignatov has created another excellent resource which he asked me to share with you, since there were some changes to imports in the starters as of beta.6.
1. Update the Ionic CLI to the latest version:
npm install -g ionic@beta
2. If you’re upgrading a project using Ionic 2.0.0-beta.3 or older check out the following guide first.
3. Remove the line import 'es6-shim' from app.ts/app.js. If you’re using webpack, remove ‘es6-shim’ from the e…
Yeh, this is what I was thinking. It solved the problem.
Thanks @xr0master !