VSTS Publish Quality Gate Result with NPM, parses node_modules folder and hangs on symbolic links

sonarqube
sonarcloud

(Vinzz) #1
  • Azure Devops Task: Publish Quality Gate Result
  • versions used: 4.3.0
  • error observed:

The parsing for Results after a nodeJS based project goes through the node_modules folder, and hangs on what seems to be a symbolic link:

##[debug]Agent.BuildDirectory=C:\Agt1\_work\12
2019-02-20T11:08:05.1588658Z ##[debug]defaultRoot: 'C:\Agt1\_work\12'
2019-02-20T11:08:05.1589130Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2019-02-20T11:08:05.1589486Z ##[debug]findOptions.followSymbolicLinks: 'true'
...
2019-02-20T11:08:06.3261697Z ##[debug]  C:\Agt1\_work\12\s\node_modules\@angular\cli\.bin (directory)
2019-02-20T11:08:06.3428389Z ##[debug][SQ] Publish task error: Failed find: ENOENT: no such file or directory, stat 'C:\Agt1\_work\12\s\node_modules\@angular\cli\.bin\ng'
2019-02-20T11:08:06.3430340Z ##[debug]task result: Failed
2019-02-20T11:08:06.3787512Z ##[error]Failed find: ENOENT: no such file or directory, stat 'C:\Agt1\_work\12\s\node_modules\@angular\cli\.bin\ng'
2019-02-20T11:08:06.3834908Z ##[debug]Processed: ##vso[task.issue type=error;]Failed find: ENOENT: no such file or directory, stat 'C:\Agt1\_work\12\s\node_modules\@angular\cli\.bin\ng'
2019-02-20T11:08:06.3836358Z ##[debug]Processed: ##vso[task.complete result=Failed;]Failed find: ENOENT: no such file or directory, stat 'C:\Agt1\_work\12\s\node_modules\@angular\cli\.bin\ng'
2019-02-20T11:08:06.3856409Z ##[section]Finishing: Publish Quality Gate Result
  • steps to reproduce: analyse in Azure Devops an npm based project, with Angular in it’s dependancies

  • potential workaround: I reckon this option findOptions.followSymbolicLinks might be set to false or at least left to the user to choose.


(Julien Henry) #3

Hi,

I think this is similar to https://jira.sonarsource.com/browse/VSTS-172.

Anyway thanks for reporting.


(Vinzz) #4

Hi Julien, indeed, I’ll vote on this bug, thanks!


(Vinzz) #5

Workaround:
[rimraf](https://github.com/isaacs/rimraf) node_modules

before publishing