Support Forums

First time build and deployment

I just followed the simple step by guide to deploy a REACT app.

Is this still the way to do it?

Since I am getting strange (to me) errors:

C:\dev\twitch2>npm run build

> twitch2@0.1.0 build C:\dev\twitch2
> react-scripts build

Creating an optimized production build...
Compiled with warnings.

  Line 174:8:   React Hook useEffect has a missing dependency: 'updateStatus'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
  Line 265:23:  Expected '===' and instead saw '=='                                                                              eqeqeq
  Line 337:26:  Expected '===' and instead saw '=='                                                                              eqeqeq
  Line 374:34:  Array.prototype.map() expects a return value from arrow function                                                 array-callback-return
  Line 386:36:  Array.prototype.map() expects a return value from arrow function                                                 array-callback-return

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  95.52 KB          build\static\css\2.566584d8.chunk.css
  46.56 KB          build\static\js\2.f2795718.chunk.js
  22.71 KB (-32 B)  build\static\js\main.4610e347.chunk.js
  1.39 KB           build\static\js\3.69504356.chunk.js
  1.17 KB           build\static\js\runtime-main.25c34f8d.js
  1.17 KB           build\static\css\main.d688c777.chunk.css

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:


C:\dev\twitch2>netlify deploy
Please provide a publish directory (e.g. "public" or "dist" or "."):
? Publish directory C:\dev\twitch2\build
Deploy path: C:\dev\twitch2\build
Deploying to draft URL...
√ Finished hashing 123 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/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/methods/response.js:12:11)
    at async callMethod (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/methods/index.js:36:26)
    at async module.exports (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/deploy/index.js:92:14)
    at async NetlifyAPI.deploy (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/netlify/src/index.js:93:12)
    at async runDeploy (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/src/commands/deploy.js:222:15)
    at async DeployCommand.run (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/src/commands/deploy.js:422:21)
    at async DeployCommand._run (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Config.runCommand (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@oclif/config/lib/config.js:172:9)
    at async Main.run (C:/Users/Admin/AppData/Roaming/npm/node_modules/netlify-cli/node_modules/@oclif/command/lib/main.js:22:9)

The app works ok in the development server localhost:3000, running npm on windows 10, but I get deployment errors in the netlify dashboard.

2 posts were merged into an existing topic: All deploys have started failing - JSONHTTPError: Build is already done