Search code examples
angularazure-devopsnomachine-nx

Azure and NX, error while running a pipeline : npm : Another process, with id 4224, is currently running ngcc


I'm trying to run a pipeline with Azure, when it comes to build, it fails with this error :

enter image description here

When I run the nx affected --target=build --base=origin/master --prod --parallel command locally, I also have the Another process... message but it doesn't show as an error which lets the build continues. But on Azure it just fails :(

Any idea how I can solve this? Thanks


Solution

  • After further investigation, I found out the problem was with powershell.

    Here is the yaml code I was using :

    - task: PowerShell@2
            displayName: 'Running build'
            inputs:
              targetType: 'inline'
              script: 'npm run nx affected -- --target=build --base=origin/master --prod --parallel'
    

    It looks like Powershell exited on this error which doesn't seem to be the case with either cmd.exe or pwsh. Here is the version that works :

    - pwsh: 'npm run nx affected -- --target=build --parallel --base=origin/master --prod'
            displayName: 'Running build'