I tried to build my Angular 13 app on a self-hosted agent and created the following YAML snippet for this:
- task: NodeTool@0
displayName: 'Install Node.js'
inputs:
versionSpec: '14.x'
- script: |
npm install -g @angular/cli
npm install
ng build --configuration production --aot
displayName: 'npm install and build'
workingDirectory: '$(Build.SourcesDirectory)/src'
I can observe the /s directory of the agent _work-directory and after my task was running, there is no node_modules folder or dist folder inside.
But also no console output.
If I remove the line "npm install -g @angular/cli" from the line, a node_modules folder gets created, but no dist-folder.
I am pretty sure that the installation of angular cli fails, but I do not get any error output in my window.
It just looks like this:
How can I get more logs to find out why the angular cli is not installing correctly? I saw that the "script" file that is executed on the agent puts an @echo off by default in front of the script.
Why is that?
How can I get some output to find my problem?