Ok, today I did an ionic serve and suddenly I see a blank page and I saw below errors in console.
On checking the build
folder located in www
, I only found
- polyfills.js
- sw-toolbox.js
So, the error is pretty evident. I also realized that ionic builds these on it’s own when we do ionic serve
or ionic lab
.
How to fix this issue? Below is my ionic info
details. Let me know if you need more info.
Stuck with this the whole day. Tried all possible solutions from the internet but no avail.
Ionic or maybe it’s packages are hyper sensitive towards version number of packages. One slight mismatch causes the entire project to fail and it becomes a complete mess trying to fix one thing and breaking some other package.
Have your tried remove node_modules
folder and run npm install
?
1 Like
Yes, I did that too but issue still persisted. I also created new ionic project, copied the src
there and did ionic serve
. Issue still remained.
I later removed the 2 new pages I had created and then everything worked fine. It seems that it might be because of some kind of syntax such as publishers : []
I had in one of those .ts
files.
I recreated those 2 pages and this time changed publishers : []
to publishers : any
and now everything is smooth and working fine.
1 Like