Ionic Deploy: great service, not that great documentation.

Ionic "can't find variable: Ionic"

I’ve tried Ionic Deploy today. It wasn’t that easy like the documentation shows that seems to be. I followed each step carefully in the "install tutorial" and I waited the magic happen. Sadly, it didn’t happen. And Ionic showed this to me:

Can’t find variable: Ionic

What a marvelous and ironic error message, right? I did some research over the web, lost almost an hour and there wasn’t nothing about it, neither in Ionic Forums nor from Stackoverflow questions (but can’t find variable: cordova is easy to find). Then, I bumped over a Raymond Camden’s post:

What happens when you screw up an Ionic Deployment?

Then I thought: If mr. Camden could screw Ionic Deploy, he must have done right previously. So, I was right and I got my answer from his post (thanks again, mr. Camden). What I missed (and I think that Ionic Deploy’s documentation missed either) was:

  • Inject ionic.services.core into my module dependencies
  • Insert ionic.io.bundle.min.js into my index.html

After that, the error was gone, my app was alive again and I could upload my application to Ionic Deploy with the following:

ionic upload --note "<my_changelog_brief>" --deploy=production

I hope this helps anyone else out there and helps to improve Ionic Services documentation. But I think this guy will be specially happy, if he did not already found the answer. ;)

--

--

--

Passionate father, truly researcher and enthusiastic software developer. I am building web services, mobile apps and a life for my son.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Matheus CAS

Matheus CAS

Passionate father, truly researcher and enthusiastic software developer. I am building web services, mobile apps and a life for my son.

More from Medium

Programming Diaries — Day 4 —

Recent methodologies in Intermediate Code Generator

Building Games in ECS with Entity Relationships

Fin, Vect and restrict in idris