Ionic Deploy: great service, not that great documentation.

Ionic "can't find variable: Ionic"

Matheus CAS
2 min readJan 23, 2016

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. ;)

--

--

Matheus CAS

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