问题
I get this error when I deploy my deploy.sh file to azure. How can I fix this ?
Command: bash deploy.sh
Handling node.js deployment.
KuduSync.NET from: 'D:\home\site\repository\nodejs' to: 'D:\home\site\wwwroot'
Error: Could not find a part of the path 'D:\home\site\repository\nodejs'.
An error has occurred during web site deployment.
Kudu Sync failed
Error: Could not find a part of the path 'D:\home\site\repository\nodejs'.\r\nD:\Program Files (x86)\SiteExtensions\Kudu\59.51202.2583\bin\Scripts\starter.cmd bash deploy.sh
My website is using NodeJS as taskrunner, but the build scripts fails before it even reaches the build part.
This is the code that fails:
if [[ "$IN_PLACE_DEPLOYMENT" -ne "1" ]]; then
"$KUDU_SYNC_CMD" -v 50 -f "$DEPLOYMENT_SOURCE/nodejs" -t "$DEPLOYMENT_TARGET" -n "$NEXT_MANIFEST_PATH" -p "$PREVIOUS_MANIFEST_PATH" -i ".git;.hg;.deployment;deploy.sh"
exitWithMessageOnError "Kudu Sync failed"
fi
I'm on a mac and the the code that fails was generated by the azure-cli package.
回答1:
The error indicates,
Error: Could not find a part of the path 'D:\home\site\repository\nodejs'.
So please change "$DEPLOYMENT_SOURCE/nodejs" to "$DEPLOYMENT_SOURCE" and redeploy it.
Or you can regenerate the deploy.sh file with the command below in Azure CLI,
azure site deploymentscript --node -t bash
来源:https://stackoverflow.com/questions/40960685/azure-fails-when-i-try-to-deploy-through-github