Answered by:
Twilio Module disappeared from my account?

Question
-
I had installed the twilio module as per the instructions here http://azure.microsoft.com/en-us/documentation/articles/partner-twilio-mobile-services-how-to-use-voice-sms/ and developer critical scripts depending on this module but was surprised to see that it had been un-installed/deleted from my account.
It had been working perfectly fine for the past 2 weeks prior to the this. I have no re-installed it and its working fine, could you please investigate why this has occurred and how I can prevent this from happening in the future?
Thanks
Saturday, September 27, 2014 2:51 PM
Answers
-
You can clone your repo directly, the url is on the config tab of your mobile service. Otherwise it will look like so:
https://<mobileservice>.scm.azure-mobile.net/<mobileservice>.git
From there you will have a service folder, and inside that you should have a default package.json like so:
{ "name": "philtest", "version": "1.0.0", "description": "philtest - hosted on Windows Azure Mobile Services", "main": "server.js", "engines": { "node": ">= 0.8.19" }, "dependencies": { "socket.io": "~0.9.6" }, "devDependencies": {}, "scripts": {}, "author": "unknown", "licenses": [], "keywords":[] }
For yours, you'd replace where I have socket.io with twilio. Then push to master after committing it. That should auto trigger a redeploy of your mobile service.
Phil
- Marked as answer by eletto Tuesday, September 30, 2014 10:24 PM
Sunday, September 28, 2014 6:33 AM
All replies
-
This looks like an issue with our tutorial. When your application gets updated, custom npm installs as shown in the tutorial will get blown away.
You either need to install twilio, and use git add to commit it to the repo, or update the package.json file in the service folder to list twilio as a required module.
- Proposed as answer by Phillip Van Nortwick Sunday, September 28, 2014 6:35 AM
Saturday, September 27, 2014 7:31 PM -
Hi Phil
Thanks for your reply. Where can I add these files using GIT? I tried in D:\home\site\wwwroot\App_Data\config\scripts but theres not git root there.
Thanks
Sunday, September 28, 2014 12:05 AM -
You can clone your repo directly, the url is on the config tab of your mobile service. Otherwise it will look like so:
https://<mobileservice>.scm.azure-mobile.net/<mobileservice>.git
From there you will have a service folder, and inside that you should have a default package.json like so:
{ "name": "philtest", "version": "1.0.0", "description": "philtest - hosted on Windows Azure Mobile Services", "main": "server.js", "engines": { "node": ">= 0.8.19" }, "dependencies": { "socket.io": "~0.9.6" }, "devDependencies": {}, "scripts": {}, "author": "unknown", "licenses": [], "keywords":[] }
For yours, you'd replace where I have socket.io with twilio. Then push to master after committing it. That should auto trigger a redeploy of your mobile service.
Phil
- Marked as answer by eletto Tuesday, September 30, 2014 10:24 PM
Sunday, September 28, 2014 6:33 AM -
You can also have NPM edit your package.json for you by doing a 'npm install twilio --save' in the same directory as your package.json. Just be aware, depending on which version of node you have installed, it might add an entry that specifies the version with a caret e.g. '^1.7.0'. This is not supported yet, so change the caret to a tilde e.g. '~1.7.0'.Tuesday, September 30, 2014 12:27 AM