[SOLVED] Blank app with ionic serve after git clone


#1

Hello,

I have a working app (Ionic 2 Beta 7). I pushed to Github, then git cloned into a different folder.
Ran npm install andionic state restore. However, ionic serve still produces a blank app.
The only error message in Chrome’s dev tools is

http://localhost:8100/build/js/app.bundle.js Failed to load resource: the server responded with a status of 404 (Not Found)

I have read topics here and on Github but haven’t managed to make it work.
Tried bower install & running cmd as admin, nothing.
For the record, everything is on C:\ drive, where Node is installed as well.


#2

are there any errors - typescript or otherwise preventing the build? Perhaps you installed plugins in the original project without the --save flag and it’s erroring out due to a missing pluign?


#3

Theres an error in the config

ionic-gulp-browserify-typescript

set that dependency in your package to 1.1.0 instead of ^1.1.0


#4

I did just fix that but it still gives a blank page (I only took the “^” out for ionic-gulp-browserify-typescript. Should I do it for everything?)

Give a look to the build log. It looks fine but the thing still doesn’t work… -_-

Also, here’s the Chrome window. Dev tools shows that basically no app sources are loaded :confused:


#5

[SOLVED]
Turns out you need to remove the “^” and re-run npm install.
(I had only ran it in the beginning).

Similar issue here:


#6

Yes. With every change to package.json you should run npm install, because otherwise it doesn’t affect anything. I could’ve stated that :slight_smile: Good you figured out!


#7

Thanks for contributing :slight_smile:
Shouldn’t this be found as a known issue somewhere?


#8

From my experience, the Ionic crew is always trying hard to keep everything up to date. Which is quite hard in these times (of rapid developments). It’ll be okay


#9

Sure, definitely. Just made me wonder for a while why no cloned gits were working :smile:
Thanks again!


#10

It’s about the journey, not the destination :wink: