Cli: Build is already done 422

Created on 9 Nov 2020  Â·  19Comments  Â·  Source: netlify/cli

Describe the bug
After successfully running netlify build, we attempt to run netlify deploy. It returns "Build is already done 422"

A clear and concise description of what the bug is.
Deploy error.

To Reproduce

Steps to reproduce the behavior:

Create a new nuxtjs project or clone our test project

  1. Run git clone https://github.com/soongsta/zzz
  2. Navigate to the cloned repository
  3. install packages with npm install
  4. Run netlify build
  5. Create a new site on netlify using project
  6. link by running `netlify link'
  7. Run netlify deploy -p (even without -p, the error occurs)

Error displays

Deploy path: C:devdelme\00testapp\dist
Deploying to main site URL...
√ Finished hashing 11 files
| CDN diffing files... » Warning: JSONHTTPError: Build is already done 422
» Warning:
» {
» "name": "JSONHTTPError",
» "status": 422,
» "json": {
» "code": 422,
» "message": "Build is already done"
» }
» }
»
/ CDN diffing files...JSONHTTPError: Unprocessable Entity
at parseResponse (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/methods/response.js:12:11)
at async callMethod (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/methods/index.js:36:26)
at async module.exports (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/deploy/index.js:92:14)
at async NetlifyAPI.deploy (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/index.js:93:12)
at async runDeploy (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/src/commands/deploy.js:222:15)
at async DeployCommand.run (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/src/commands/deploy.js:422:21)
at async DeployCommand._run (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@oclif/command/lib/command.js:43:20)
at async Config.runCommand (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@oclif/config/lib/config.js:172:9)
at async Main.run (C:/Users/team/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@oclif/command/lib/main.js:22:9)

Configuration:

System:
OS: Windows 10 10.0.19041
CPU: (8) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
Memory: 16.09 GB / 31.84 GB
Binaries:
Node: 12.17.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Expected behavior

A clear and concise description of what you expected to happen.

Project deploys.

bug

Most helpful comment

Similar 422 error but with message Deploy assets are missing. To deploy successfully, ensure files are present.

Deploy path:        /Users/dw/Vendia/site/out
Configuration path: /Users/dw/Vendia/site/netlify.toml
Deploying to draft URL...
Warning: JSONHTTPError: Deploy assets are missing. To deploy successfully, ensure files are present. 422
    at Object.warn (/Users/dw/Vendia/site/node_modules/@oclif/errors/lib/index.js:33:15)
    at warn (/Users/dw/Vendia/site/node_modules/@oclif/command/lib/command.js:57:16)
    at runDeploy (/Users/dw/Vendia/site/node_modules/netlify-cli/src/commands/deploy.js:238:9)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
Warning:
{
  "name": "JSONHTTPError",
  "status": 422,
  "json": {
    "code": 422,
    "message": "Deploy assets are missing. To deploy successfully, ensure files are present."
  }
}

The static assets exist in /Users/dw/Vendia/site/out for some reason the deploy is failing though.

API troubles upstream?

All 19 comments

Having the same issue here

Same here

Same issue here: https://community.netlify.com/t/all-deploys-have-started-failing-jsonhttperror-build-is-already-done/26043
Might be fixed by updating netlify-cli

using version 2.68

Pretty much blocking the CD pipeline

Is this being treated as an incident? This seems like hard fail on deploys: https://www.netlifystatus.com/ Confirming we are on 2.68.0 and having the same problem. :/

we rolled back to version 2.65.6 which seems to work, however, we dont believe it is a version issue, as it (netlify deploy) was working for us on version 2.66+

It's not a proper debugging step, or just it was fixed behind curtains, but I've changed the auth token and now it's deploying with no problem.

same here, doesn't work when downgrade cli, it seems its upstream issue with netlify, wierd message, no idea what they mean by that, im building locally so off course its done befere running netlify deploy.

We retried version 2.68, and it seems to work again

Saw this as well with "netlify-cli": "^2.65.6"

Seems like downstream API issue with bitballoon

Similar 422 error but with message Deploy assets are missing. To deploy successfully, ensure files are present.

Deploy path:        /Users/dw/Vendia/site/out
Configuration path: /Users/dw/Vendia/site/netlify.toml
Deploying to draft URL...
Warning: JSONHTTPError: Deploy assets are missing. To deploy successfully, ensure files are present. 422
    at Object.warn (/Users/dw/Vendia/site/node_modules/@oclif/errors/lib/index.js:33:15)
    at warn (/Users/dw/Vendia/site/node_modules/@oclif/command/lib/command.js:57:16)
    at runDeploy (/Users/dw/Vendia/site/node_modules/netlify-cli/src/commands/deploy.js:238:9)
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
Warning:
{
  "name": "JSONHTTPError",
  "status": 422,
  "json": {
    "code": 422,
    "message": "Deploy assets are missing. To deploy successfully, ensure files are present."
  }
}

The static assets exist in /Users/dw/Vendia/site/out for some reason the deploy is failing though.

API troubles upstream?

I am getting the same issue as david

I tried rolling back to version 2.65.6 and did a new netlify build and netlify deploy.

I then tried upgrading to the latest version at 2.68.5 and again did netlify build and deploy again

tried linking and unlinking repos.

tried repos that were working last friday and no longer working today. they stopped working.

It was working perfectly until a few minutes ago, I didn't change anything on my end and now I'm getting that 422 error again

I've raised the issue to our build engineers to look at - may not get to it before tomorrow but it is on our team's radar to look into. Thanks to @DavidWells for the out of band ping :)

I think it is a upstream issue

We have reverted a change to the API that netlify-cli uses and we believe the issue should be resolved now. However, we are looking for confirmation from others to be sure.

Please comment below to let us know if the issue is fixed or not when you deploy.

Note: There is no update required to test as this change wasn't to the CLI tool itself.

UPDATE: We do have two confirmations now that the recent change has resolved the issue.

Fixed for me. Thanks @overlordofmu & @fool 😃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karl-cardenas-coding picture karl-cardenas-coding  Â·  4Comments

bendg25 picture bendg25  Â·  5Comments

designbuedchen picture designbuedchen  Â·  5Comments

iamskok picture iamskok  Â·  3Comments

janbaer picture janbaer  Â·  4Comments