This project is read-only.

Unable to download debug module using npm while deploying to azure

Jan 5, 2014 at 1:14 PM
Edited Jan 5, 2014 at 2:02 PM
Im using vs tools for node.js to deploy an express application to an azure website through source control publishing using GIT.

I created a basic express application and pushed it to azure without making any changes to it. it failed to render complaining that it can't find the debug module.

looking closely into it I found that stylus wasnt able to download its debug dependency which is causing the website to fail.

the package.json of my expressapp looks like the following.
{ "engines": { "node": "0.10.21" }, "name": "ExpressApp1", "version": "0.0.0", "description": "ExpressApp1", "main": "app.js", "author": { "name": "Ahmad", "email": "" }, "dependencies": { "express": "3.4.4", "jade": "*", "stylus": "0.41.3" } }

the interesting thing is that express also depends on the debug module and it gets it just fine.

also, im able to get the debug module locally for stylus on my local dev machine.

any help would be appreciated in figuring out this issue.
Jan 5, 2014 at 2:01 PM
update 1:
The core issue is still unresolved however adding the debug module explicitly in the main package.json provides a temporary resolution to it.
Jan 7, 2014 at 9:41 PM
Edited Jan 7, 2014 at 9:41 PM
Did you do the git push from the command line or from within Visual Studio? I just went through the following steps and the only issue I ran into is that the jade template needs to be updated to use "doctype html" instead of "doctype 5".
File->New Project
Select Express App
Uncheck "Create directory for solution"
Create project, don't install dependencies when prompted
Right click on solution node and Add Solution to Source Control
Choose Git
Switch to Team Explorer window, enter commit message, and press Commit
Fix doctype string
Open command prompt in project
git remote add azure ...
git push azure master
At this point you should see a bunch of output from KuduSync. If you don't select "Create directory for solution" Kudo doesn't recognize this as a Node.js app and does basic deployment. You should see the result of running the various npm installs here and for Stylus I see that we successfully install debug:
remote: stylus@0.42.0 node_modules\stylus
remote: +-- css-parse@1.7.0
remote: +-- debug@0.7.4
remote: +-- mkdirp@0.3.5
remote: +-- sax@0.5.8
remote: +-- glob@3.2.7 (inherits@2.0.1, minimatch@0.2.14)
Maybe there was an intermittent network issue which causes it not to be installed remotely?

From there I'm able to browse to the site and see Welcome to Express.

If those steps don't work for you can you post back the result of doing the git push from the command line?