An Azure service for ingesting, preparing, and transforming data at scale.
Hello @Bánhidy Attila
Based on the latest error, the --path option is working correctly.
Your log shows:
node /home/agent/.../_scripts/AdfPublishTool/main.js validate ...
So @microsoft/azure-data-factory-utilities is executing your local main.js rather than failing because it cannot download the bundle.
Microsoft documents --path specifically for this scenario: when the build environment cannot download the bundle because of network/proxy restrictions, you can provide an existing downloaded bundle directly.
The command should therefore remain in this form:
npm run build -- --path "/path/to/main.js" validate \
"/path/to/Datafactory" \
"/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.DataFactory/factories/<factoryName>"
and for export:
npm run build -- --path "/path/to/main.js" export \
"/path/to/Datafactory" \
"/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.DataFactory/factories/<factoryName>" \
"ArmTemplateOutput"
I would remove the bundle.manager.js modification completely. Patching files under node_modules isn't necessary when using the supported --path option and makes troubleshooting harder.
The remaining:
Execution failed with exit code: 1 is now a different issue. Unfortunately, the useful error from main.js isn't visible in the output you've posted.
The earlier ERR_CHILD_PROCESS_STDIO_MAXBUFFER is also important because it indicates the child process generated more stderr output than the wrapper could retain. That may be hiding the actual ADF validation error.
As the next test, run the downloaded bundle directly, bypassing the npm utility wrapper:
node --trace-uncaught "/path/to/main.js" validate \
"/path/to/Datafactory" \
"/subscriptions/<subscriptionId>/resourceGroups/<resourceGroup>/providers/Microsoft.DataFactory/factories/<factoryName>"
This should expose the actual validation exception rather than only bundle.manager.js
Execution failed with exit code: 1
Also verify that the manually downloaded file is actually JavaScript and wasn't replaced by a proxy/authentication/error page:
file "/path/to/main.js"
head -c 100 "/path/to/main.js"
wc -c "/path/to/main.js"
So at this stage, I wouldn't troubleshoot Internet access anymore. Your local bundle is being selected successfully. The next objective is to capture the actual exception generated by main.js during validation.
Sharing this reference with you:
Automated publishing for Azure Data Factory CI/CD
If the direct node --trace-uncaught main.js validate ... command returns an error, please post the final exception/stack trace (with subscription/resource details redacted). That should identify the actual remaining problem.