node.js - Microsoft Azure Continuous Integration - NodeJs Solution with Grunt "Compile" step -



node.js - Microsoft Azure Continuous Integration - NodeJs Solution with Grunt "Compile" step -

some precursor question.

i might bit verbose details, i'd ensure i'm not leaving out might causing problem. (i'll append finish error log @ end of question. don't expect go buck wild it. i'll seek summarize much can)

i scaffold-ed angularjs project using yeoman.using the yo angular command. i created deploy.cmd & .deployment files pushed git repository on bitbucket. (only commited root folder files, , test & app folders) from there, linked azure via website quick setup. my build separated 2 parts installing grunt , bower (globally) during deployment, , installing grunt packages during npm bundle installation then i'll need effort run grunt build post_deployment_action

package.json (prod dependencies)

"dependencies": { "grunt": "^0.4.1", "grunt-autoprefixer": "^0.7.3", "grunt-concurrent": "^0.5.0", "grunt-contrib-clean": "^0.5.0", "grunt-contrib-concat": "^0.4.0", "grunt-contrib-copy": "^0.5.0", "grunt-contrib-cssmin": "^0.9.0", "grunt-contrib-htmlmin": "^0.3.0", "grunt-contrib-imagemin": "^0.8.1", "grunt-contrib-jshint": "^0.10.0", "grunt-contrib-uglify": "^0.4.0", "grunt-filerev": "^0.2.1", "grunt-google-cdn": "^0.4.0", "grunt-newer": "^0.7.0", "grunt-ng-annotate": "^0.3.0", "grunt-svgmin": "^0.4.0", "grunt-usemin": "^2.1.1", "grunt-wiredep": "^1.7.0", "jshint-stylish": "^0.2.0", "load-grunt-tasks": "^0.4.0", "time-grunt": "^0.3.1" },

deployment.cmd (some parts omitted brevity)

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: :: deployment :: ---------- :deployment echo handling node.js deployment. :: 1. select node version phone call :selectnodeversion :: 2. install bower packages if exist "%deployment_target%\bower.json" ( echo installing bower phone call :executecmd !npm_cmd! install -g bower if !errorlevel! neq 0 goto error echo installing bower success popd ) :: 3. install grunt if exist "%deployment_target%\gruntfile.js" ( echo installing grunt-cli phone call :executecmd !npm_cmd! install -g grunt-cli if !errorlevel! neq 0 goto error echo installing grunt-cli success popd ) :: 4. install npm packages if exist "%deployment_target%\package.json" ( echo installing npm packages pushd "%deployment_target%" phone call :executecmd !npm_cmd! install --production if !errorlevel! neq 0 goto error echo installing npm packages popd ) :: 5. kudusync if /i "%in_place_deployment%" neq "1" ( phone call :executecmd "%kudu_sync_cmd%" -v 50 -f "%deployment_source%" -t "%deployment_target%" -n "%next_manifest_path%" -p "%previous_manifest_path%" -i ".git;.hg;.deployment;deploy.cmd" if !errorlevel! neq 0 goto error ) :: post deployment stub if defined post_deployment_action ( echo "%post_deployment_action%" echo %0 phone call :executecmd "%post_deployment_action%" if !errorlevel! neq 0 goto error )

i have 2 problems: stands build failing next error:

error: specified path, file name, or both long. qualified file name must less 260 characters, , directory name must less 248 characters.

i believe grunt/some of dependencies be culprit, don't know how past roadblock. way understand how dependency management work in node nested structure, each dependency have own node_modules folder... infinity & beyond.

second problem

looking app.js/server.js under site root.

missing server.js/app.js files, web.config not generated

i realize app.js not in root. believe it's fixed setting change, can 1 time solution compiles on azure, app.js sitting in folder called dist gets created 1 time compilation succeeds.

complete error log

command: deploy.cmd using custom deployment setting post_deployment_action custom value 'grunt build'. handling node.js deployment. looking app.js/server.js under site root. missing server.js/app.js files, web.config not generated node.js versions available on platform are: 0.6.17, 0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32. selected node.js version 0.10.32. utilize package.json file take different version. updating iisnode.yml @ d:\home\site\wwwroot\iisnode.yml installing bower c:\dwasfiles\sites\~1businessintelligenceadviser\appdata\npm\bower -> c:\dwasfiles\sites\~1businessintelligenceadviser\appdata\npm\node_modules\bower\bin\bower bower@1.3.12 c:\dwasfiles\sites\~1businessintelligenceadviser\appdata\npm\node_modules\bower ├── is-root@1.0.0 ├── junk@1.0.0 ├── stringify-object@1.0.0 ├── abbrev@1.0.5 ├── chmodr@0.1.0 ├── which@1.0.5 ├── osenv@0.1.0 ├── archy@0.0.2 ├── opn@1.0.0 ├── rimraf@2.2.8 ├── bower-logger@0.2.2 ├── lru-cache@2.5.0 ├── bower-endpoint-parser@0.2.2 ├── graceful-fs@3.0.4 ├── lockfile@1.0.0 ├── retry@0.6.0 ├── nopt@3.0.1 ├── tmp@0.0.23 ├── request-progress@0.3.0 (throttleit@0.0.2) ├── q@1.0.1 ├── shell-quote@1.4.2 (array-filter@0.0.1, array-reduce@0.0.0, array-map@0.0.0, jsonify@0.0.0) ├── chalk@0.5.0 (escape-string-regexp@1.0.2, ansi-styles@1.1.0, supports-color@0.2.0, strip-ansi@0.3.0, has-ansi@0.1.0) ├── semver@2.3.2 ├── fstream@1.0.2 (inherits@2.0.1) ├── bower-json@0.4.0 (intersect@0.0.3, deep-extend@0.2.11, graceful-fs@2.0.3) ├── p-throttler@0.1.0 (q@0.9.7) ├��─ promptly@0.2.0 (read@1.0.5) ├── mkdirp@0.5.0 (minimist@0.0.8) ├── fstream-ignore@1.0.1 (inherits@2.0.1, minimatch@1.0.0) ├── bower-config@0.5.2 (osenv@0.0.3, graceful-fs@2.0.3, optimist@0.6.1) ├── tar-fs@0.5.2 (pump@0.3.5, tar-stream@0.4.7) ├── decompress-zip@0.0.8 (mkpath@0.1.0, nopt@2.2.1, touch@0.0.2, readable-stream@1.1.13, binary@0.3.0) ├── glob@4.0.6 (inherits@2.0.1, once@1.3.1, minimatch@1.0.0) ├── request@2.42.0 (caseless@0.6.0, json-stringify-safe@5.0.0, forever-agent@0.5.2, aws-sign2@0.5.0, stringstream@0.0.4, oauth-sign@0.4.0, tunnel-agent@0.4.0, node-uuid@1.4.1, qs@1.2.2, mime-types@1.0.2, form-data@0.1.4, bl@0.9.3, tough-cookie@0.12.1, http-signature@0.10.0, hawk@1.1.1) ├── bower-registry-client@0.2.1 (graceful-fs@2.0.3, request-replay@0.2.0, lru-cache@2.3.1, async@0.2.10, mkdirp@0.3.5, request@2.27.0) ├── cardinal@0.4.0 (redeyed@0.4.4) ├── update-notifier@0.2.0 (semver-diff@0.1.0, string-length@0.1.2, latest-version@0.2.0, configstore@0.3.1) ├── mout@0.9.1 ├── handlebars@2.0.0 (optimist@0.3.7, uglify-js@2.3.6) ├── inquirer@0.7.1 (figures@1.3.3, mute-stream@0.0.4, through@2.3.6, readline2@0.1.0, lodash@2.4.1, rx@2.3.14, cli-color@0.3.2) └── insight@0.4.3 (object-assign@1.0.0, async@0.9.0, chalk@0.5.1, os-name@1.0.1, lodash.debounce@2.4.1, tough-cookie@0.12.1, configstore@0.3.1, inquirer@0.6.0) installing bower success installing grunt-cli c:\dwasfiles\sites\~1businessintelligenceadviser\appdata\npm\grunt -> c:\dwasfiles\sites\~1businessintelligenceadviser\appdata\npm\node_modules\grunt-cli\bin\grunt grunt-cli@0.1.13 c:\dwasfiles\sites\~1businessintelligenceadviser\appdata\npm\node_modules\grunt-cli ├── nopt@1.0.10 (abbrev@1.0.5) ├── resolve@0.3.1 └── findup-sync@0.1.3 (glob@3.2.11, lodash@2.4.1) installing grunt-cli success installing npm packages npm warn package.json businessintelligenceadviser@0.0.0 no description npm warn package.json businessintelligenceadviser@0.0.0 no repository field. npm warn package.json businessintelligenceadviser@0.0.0 no readme info npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-gifsicle\node_modules\gifsicle\node_modules\bin-wrapper\node_modules\bin-check\node_modules\executable\node_modules\meow\node_modules\indent-string requires minimist@'^1.1.0' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-gifsicle\node_modules\gifsicle\node_modules\bin-wrapper\node_modules\bin-check\node_modules\executable\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\meow requires minimist@'^1.1.0' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\bin-wrapper\node_modules\bin-version-check\node_modules\bin-version\node_modules\find-versions requires minimist@'^1.1.0' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\bin-wrapper\node_modules\download\node_modules\decompress-tar requires vinyl@'^0.4.3' load npm warn unmet dependency undefined, installing npm packages npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\bin-wrapper\node_modules\download\node_modules\decompress-tarbz2 requires vinyl@'^0.4.3' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\bin-wrapper\node_modules\download\node_modules\decompress-targz requires vinyl@'^0.4.3' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\bin-wrapper\node_modules\download\node_modules\decompress-unzip requires vinyl@'^0.4.3' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-jpegtran\node_modules\jpegtran-bin\node_modules\bin-wrapper\node_modules\download\node_modules\vinyl-fs requires vinyl@'^0.4.0' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\node_modules\bin-build\node_modules\download\node_modules\vinyl-fs\node_modules\glob-stream\node_modules\glob2base requires lodash@'^2.4.1' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\node_modules\bin-wrapper\node_modules\bin-check\node_modules\executable\node_modules\meow\node_modules\indent-string requires minimist@'^1.1.0' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\node_modules\bin-wrapper\node_modules\bin-check\node_modules\executable\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\meow requires minimist@'^1.1.0' load npm warn unmet dependency undefined, npm warn unmet dependency version undefined npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-optipng\node_modules\optipng-bin\node_modules\bin-wrapper\node_modules\bin-version-check\node_modules\bin-version\node_modules\find-versions requires minimist@'^1.1.0' load npm warn unmet dependency undefined, kudusync.net from: 'd:\home\site\repository' to: 'd:\home\site\wwwroot' copying file: 'node_modules\grunt-autoprefixer\.travis.yml' npm warn unmet dependency version undefined copying file: 'node_modules\grunt-autoprefixer\changelog' npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\bin-build\node_modules\download\node_modules\meow\node_modules\indent-string requires minimist@'^1.1.0' load copying file: 'node_modules\grunt-autoprefixer\license-mit' npm warn unmet dependency undefined, copying file: 'node_modules\grunt-autoprefixer\package.json' npm warn unmet dependency version undefined copying file: 'node_modules\grunt-autoprefixer\readme.md' npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\bin-wrapper\node_modules\bin-check\node_modules\executable\node_modules\meow\node_modules\indent-string requires minimist@'^1.1.0' load copying file: 'node_modules\grunt-autoprefixer\node_modules\.bin\autoprefixer' copying file: 'node_modules\grunt-autoprefixer\node_modules\.bin\autoprefixer.cmd' npm warn unmet dependency undefined, copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\changelog.md' npm warn unmet dependency version undefined copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\license' npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\bin-wrapper\node_modules\bin-check\node_modules\executable\node_modules\meow\node_modules\indent-string\node_modules\repeating\node_modules\meow requires minimist@'^1.1.0' load copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\package.json' npm warn unmet dependency undefined, copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\readme.md' npm warn unmet dependency version undefined copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\bin\autoprefixer' npm warn unmet dependency d:\home\site\wwwroot\node_modules\grunt-contrib-imagemin\node_modules\imagemin\node_modules\imagemin-pngquant\node_modules\pngquant-bin\node_modules\bin-wrapper\node_modules\download\node_modules\meow\node_modules\indent-string requires minimist@'^1.1.0' load copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\data\browsers.js' npm warn unmet dependency undefined, copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\data\prefixes.js' npm warn unmet dependency version undefined copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\autoprefixer.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\binary.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\browsers.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\caniuse.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\declaration.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\info.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\keyframes.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\old-selector.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\old-value.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\prefixer.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\prefixes.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\processor.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\selector.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\utils.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\value.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\align-content.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\align-items.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\align-self.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\background-size.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\border-image.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\border-radius.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\break-inside.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\display-flex.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\fill-available.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\filter.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-basis.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-direction.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-flow.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-grow.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-shrink.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-spec.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex-wrap.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\flex.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\fullscreen.js' copying file: 'node_modules\grunt-autoprefixer\node_modules\autoprefixer\lib\hacks\gradient.js' omitting next output lines... processed 975 files... error: specified path, file name, or both long. qualified file name must less 260 characters, , directory name must less 248 characters. failed exitcode=1, command="kudusync" -v 50 -f "d:\home\site\repository" -t "d:\home\site\wwwroot" -n "d:\home\site\deployments\360cd39f800d7a19bf82bb41d4bd85830829a303\manifest" -p "d:\home\site\deployments\8ff648ca5da1071c0480e2ad3aa8a82eafeccb00\manifest" -i ".git;.hg;.deployment;deploy.cmd" error has occurred during web site deployment.

the path error i've run grunt work. seems windows issue , there aren't easy/nice solutions.

one of things we've done our grunt work heavily utilize symlinks in windows. http://technet.microsoft.com/en-us/library/cc753194.aspx

for example, install grunt dependencies in 1 directory, 1 time , create symbolic links part of build 1 directory. might help overcome long directory/filename issue.

not clear on sec issue, mklink might able help there if file exists somewhere else.

node.js azure gruntjs yeoman bower

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -