I’m using azure devops pipeline to deploy my website in netlify. There is a problem after installing netlify cli and trying to deploy app. I’m getting error:
Deploying to draft URL...
- Hashing files...
✔ Finished hashing 10 files
- CDN diffing files...
› Warning:
› {
› "message": "invalid json response body at
› https://api.netlify.com/api/v1/sites/**SITE_ID**/
› deploys reason: Unexpected end of JSON input",
› "type": "invalid-json"
› }
›
FetchError: invalid json response body at https://api.netlify.com/api/v1/sites/**SITE_ID**/deploys reason: Unexpected end of JSON input
at /opt/hostedtoolcache/node/10.17.0/x64/lib/node_modules/netlify-cli/node_modules/node-fetch/lib/index.js:272:32
##[error]Bash exited with code '2'.
This is the part of pipeline that is failing:
- script: |
npm i -g netlify-cli
netlify deploy --site $NETLIFY_SITE_ID --auth $NETLIFY_AUTH_TOKEN --prod
displayName: 'Deploy'