a bit of remote , bit of lingering question.
for last few days have struggled frustrating azure web role issue. workflow follows:
- create brand new azure cloud service project
- add c# asp.net web role (web api)
- build , confirm project start locally
you should here. wrinkle appeared when cloned git repo web api project directory (the repo houses simple ui development server in node , compiled ui assets). took me bit put together, essentially, of nested node dependencies had file paths long (dependencies had dependencies had dependencies etc) , hung web role.
if want try might include folder in web api project has files long paths, or build simple git repo , use npm install packages. package.json ui repo follows:
{ "name": "breaksmyheart", "version": "1.0.0", "description": "wont let web role start", "main": "index.js", "dependencies": { "co-views": "^0.3.0", "flux": "^2.0.1", "gulp-minify-css": "^1.0.0", "jade": "^1.9.2", "koa": "^0.18.1", "koa-compress": "^1.0.8", "koa-route": "^2.4.0", "koa-static": "^1.4.9", "object-assign": "^2.0.0", "react": "^0.13.1" }, "devdependencies": { "bower": "^1.4.1", "browserify": "^9.0.4", "coffee-reactify": "^3.0.0", "gulp": "^3.8.11", "gulp-batch": "^1.0.5", "gulp-coffee-react-transform": "0.0.2", "gulp-coffeelint": "^0.4.0", "gulp-concat": "^2.5.2", "gulp-imagemin": "^2.2.1", "gulp-nodemon": "^2.0.2", "gulp-react": "^3.0.1", "gulp-rename": "^1.2.2", "gulp-sourcemaps": "^1.5.1", "gulp-uglify": "^1.1.0", "gulp-util": "^3.0.4", "gulp-watch": "^4.2.4", "imagemin-pngquant": "^4.0.0", "koa-logger": "^1.2.2", "merge-stream": "^0.1.7", "mocha": "^2.2.4", "supertest": "^0.15.0", "vinyl-buffer": "^1.0.0", "vinyl-source-stream": "^1.1.0", "vinyl-transform": "^1.0.0" }, "scripts": { "test": "echo \"error: no test specified\" && exit 1" }, "author": "mike", "license": "mit" }
to clear, not including node_modules directory in project, doesn't seem make difference.
the azure compute emulator warn roles taking longer usual start. feel free keep waiting, lost patience after 10 minutes or (on development machine i7 , 16g ram).
to resolve issue, try deleting folder. might find not simple task, file paths long; naive
rmdir uirepo
from command prompt not suffice , you'll need try https://superuser.com/questions/256105/how-do-i-delete-a-folder-which-is-nested-quite-deep-and-avoid-file-name-too-lon
can else confirm? have worked around issue putting ui repo elsewhere , repointing gulp build tasks appropriately.
this quite common problem node_modules, because of 260 characters path length limitation on windows. when exceeded programs accessing these long paths have problems mentioned. rid of long paths might consider using shrinkwrap:
npm shrinkwrap
this generates npm-shrinkwrap.json
based on current node_modules structure used drive further instalations of package dependencies without nesting (if not required, because of different versions).
the shrinkwrap command has locked down dependencies based on what's installed in node_modules. when npm install installs package npm-shrinkwrap.json in package root, shrinkwrap file (rather package.json files) drives installation of package , of dependencies (recursively)