Search code examples
angularazure-devopsangular-clitfvc

ng build watch not working if VSTS Workspace version is Server


ng build --watch is not working if the workspace version of vsts solution is server.

but working fine if the workspace version is Local.

getting below error

EPERM: operation not permitted, rmdir 'WebServer.Web\wwwroot'
Error: EPERM: operation not permitted, rmdir 'WebServer.Web\wwwroot'
    at Object.rmdirSync (fs.js:701:3)
    at MergeMapSubscriber.isDir`enter code `enter code here`here`ectory.pipe.operators_1.concatMap.isDir [as project] (E:WebServer.Web\node_modules\@angular-devkit\core\node\host.js:173:20)
    at MergeMapSubscriber._tryNext (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:69:27)
    at MergeMapSubscriber._next (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:59:18)
    at MergeMapSubscriber.Subscriber.next (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at MapSubscriber._next (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\map.js:55:26)
    at MapSubscriber.Subscriber.next (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Subscriber.js:67:18)
    at Observable.rxjs_1.Observable.obs [as _subscribe] (E:\WebServer.Web\node_modules\@angular-devkit\core\node\host.js:212:17)
    at Observable._trySubscribe (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:44:25)
    at Observable.subscribe (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:30:22)
    at MapOperator.call (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\map.js:32:23)
    at Observable.subscribe (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:25:22)
    at MergeMapOperator.call (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\operators\mergeMap.js:39:23)
    at Observable.subscribe (E:\WebServer.Web\node_modules\@angular-devkit\core\node_modules\rxjs\internal\Observable.js:25:22)
    at E:\WebServer.Web\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\util\subscribeToObservable.js:10:20
    at Object.subscribeToResult (E:\WebServer.Web\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\util\subscribeToResult.js:10:45)

Solution

  • That's expected behavior and by design. With server workspaces, everything in the file system that's source controlled is read-only until it's checked out.

    Use local workspaces.