title: Not Publishing cucumber html report in Azure Pipeline configured with Self hosted agent and facing error
body: <p><a href="https://i.stack.imgur.com/9MVRH.png" rel="nofollow noreferrer">Cucumber HTML Report Publishing issue in Azure Pipeline</a>
  Getting error In Azure Pipeline as shown in attached screenshot and not able to publish cucumber html report. We are facing this issue when running automation sanity suite build with framework using selenium-java-cucumber-testng</p>
  <blockquote>
  <p>Below is log</p>
  <p>2022-03-09T18:11:43.1415066Z ##[section]Starting: Publish Cucumber
  Report
  2022-03-09T18:11:43.1801444Z ==============================================================================
  2022-03-09T18:11:43.1801759Z Task         : Publish Cucumber Report
  2022-03-09T18:11:43.1801978Z Description  : Publish Cucumber Report
  2022-03-09T18:11:43.1802157Z Version      : 1.0.7
  2022-03-09T18:11:43.1802342Z Author       : Maciej Maciejewski
  2022-03-09T18:11:43.1802615Z Help         : Replace with markdown to show in help
  2022-03-09T18:11:43.1802879Z ==============================================================================
  2022-03-09T18:11:44.1596868Z [command]C:\windows\system32\cmd.exe /D /S /C &quot;&quot;C:\Program Files\nodejs\npm.cmd&quot; install&quot;
  2022-03-09T18:11:48.2762116Z
  2022-03-09T18:11:48.2763063Z up to date, audited 21 packages in 2s
  2022-03-09T18:11:48.2763367Z
  2022-03-09T18:11:48.2763663Z found 0 vulnerabilities
  2022-03-09T18:11:48.3229356Z Found 1 matching C:/agent/_work/3/s/target/cucumber-report/Regresssion pattern
  2022-03-09T18:11:48.3234551Z Processing C:/agent/_work/3/s/target/cucumber-report/Regresssion/cucumber.json
  2022-03-09T18:11:49.7636079Z Saving modified report as C:/agent/_work/3/s/target/cucumber-report/Regresssion/cucumber.json
  2022-03-09T18:11:51.3916749Z [command]&quot;C:\Program Files\nodejs\node.exe&quot; script.js
  2022-03-09T18:11:59.0711692Z node:internal/fs/utils:320
  2022-03-09T18:11:59.0713145Z     throw err;
  2022-03-09T18:11:59.0713380Z     ^
  2022-03-09T18:11:59.0713483Z
  2022-03-09T18:11:59.0714229Z Error: ENOENT: no such file or directory, open
  'C:\agent_work\3\s\target\screenshots\verify_950g_9pce_as_product_packsize_unit_Of_Measure_piece_infroamtion_and_ending_with_750_850_itemsPerUnits_added_under_Magnum_brand_Multipack_productFormat_Creamy_VariantName_with_Final_as_product_status_for_Multipack_products_for_Secondary_unit_7412.png'
  2022-03-09T18:11:59.0715015Z     at Object.openSync (node:fs:495:3)
  2022-03-09T18:11:59.0715378Z     at Object.writeFileSync (node:fs:1519:35)
  2022-03-09T18:11:59.0715971Z     at C:\agent_work_tasks\PublishCucumberReport_83c082c0-5032-11ea-8fab-bbe0f0fcf287\1.0.7\reporter\node_modules\cucumber-html-reporter\lib\reporter.js:302:40
  2022-03-09T18:11:59.0716630Z     at Array.forEach ()
  2022-03-09T18:11:59.0717180Z     at C:\agent_work_tasks\PublishCucumberReport_83c082c0-5032-11ea-8fab-bbe0f0fcf287\1.0.7\reporter\node_modules\cucumber-html-reporter\lib\reporter.js:268:41
  2022-03-09T18:11:59.0717746Z     at Array.forEach ()
  2022-03-09T18:11:59.0718294Z     at C:\agent_work_tasks\PublishCucumberReport_83c082c0-5032-11ea-8fab-bbe0f0fcf287\1.0.7\reporter\node_modules\cucumber-html-reporter\lib\reporter.js:266:31
  2022-03-09T18:11:59.0718851Z     at Array.forEach ()
  2022-03-09T18:11:59.0719400Z     at C:\agent_work_tasks\PublishCucumberReport_83c082c0-5032-11ea-8fab-bbe0f0fcf287\1.0.7\reporter\node_modules\cucumber-html-reporter\lib\reporter.js:251:30
  2022-03-09T18:11:59.0720270Z     at Array.forEach () {
  2022-03-09T18:11:59.0720518Z   errno: -4058,
  2022-03-09T18:11:59.0720749Z   syscall: 'open',
  2022-03-09T18:11:59.0721154Z   code: 'ENOENT',
  2022-03-09T18:11:59.0721814Z   path: 'C:\agent\_work\3\s\target\screenshots\verify_950g_9pce_as_product_packsize_unit_Of_Measure_piece_infroamtion_and_ending_with_750_850_itemsPerUnits_added_under_Magnum_brand_Multipack_productFormat_Creamy_VariantName_with_Final_as_product_status_for_Multipack_products_for_Secondary_unit_7412.png'
  2022-03-09T18:11:59.0725722Z }
  2022-03-09T18:11:59.0817466Z ##[warning]Error: Failed to run script
  2022-03-09T18:11:59.1021753Z ##[section]Finishing: Publish Cucumber Report</p>
  </blockquote>