CSS Missing from build 404

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:


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 )

Yeh, this is what I was thinking. It solved the problem.
Thanks @xr0master!