Disable Npm warnings as Errors: build definition tfs -


i getting npm warnings errors during build using build definition. enter image description here

i added following property in msbuild arguments in build definition:

/p:treatwarningsaserrors=false 

but not working yet.

i cross-checked right-clicking each project , none of them has option "treat warnings errors" checked.

i calling npm install command post-build script.

i restarted build controller , build agent after changes tried no success.

any in direction appreciated.

msbuild arguments won't here... post-build script runs after msbuild has finished executing.

the problem npm writing warnings stderr stream, tfs detects , reports error. can suppress redirecting error stream stdout so:

npm install 2>&1 

however, suppress errors warnings, may or may not acceptable in case. in our case, call npm install powershell script during pre-build script. redirect output, scan output looking string err! so:

& npm install *>&1 | foreach-object {     $obj = $_     if ( $obj -is [system.management.automation.errorrecord] ) {         $s = $obj.exception.message     }     else {         $s = $obj.tostring()     }     if ( $s.contains('err!') ) {         write-error $s     }     else {         write-output $s     } } $lastexitcode = 0 

note set $lastexitcode 0 powershell doesn't pass exit code npm tfs.


Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -