Home
Support Forums

Deploy failed ,We couldn’t deploy your site

Hello , I’m having a trouble with deploying my app whenever I tried to deploy it , It says deployed failed .
11:38:16 PM: Build ready to start
11:38:17 PM: build-image version: 653805ca4a64301556e56dc4b321ef8fc20cbb7c
11:38:17 PM: build-image tag: v3.8.2
11:38:17 PM: buildbot version: 5ca46ad10ed1b3bf6d683d62872e59029498e5a4
11:38:18 PM: Fetching cached dependencies
11:38:18 PM: Failed to fetch cache, continuing with build
11:38:18 PM: Starting to prepare the repo for build
11:38:18 PM: No cached dependencies found. Cloning fresh repo
11:38:18 PM: git clone GitHub - Zaina-coder/dictionary-project
11:38:19 PM: Preparing Git Reference refs/heads/main
11:38:19 PM: Parsing package.json dependencies
11:38:20 PM: Starting build script
11:38:20 PM: Installing dependencies
11:38:20 PM: Python version set to 2.7
11:38:21 PM: v12.18.0 is already installed.
11:38:22 PM: Now using node v12.18.0 (npm v6.14.4)
11:38:22 PM: Started restoring cached build plugins
11:38:22 PM: Finished restoring cached build plugins
11:38:22 PM: Attempting ruby version 2.7.2, read from environment
11:38:23 PM: Using ruby version 2.7.2
11:38:23 PM: Using PHP version 5.6
11:38:23 PM: Started restoring cached node modules
11:38:23 PM: Finished restoring cached node modules
11:38:24 PM: Installing NPM modules using NPM version 6.14.4
11:38:55 PM: npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@2. I’ll try to do my best with it!
11:38:55 PM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/babel-runtime/node_modules/core-js
11:38:55 PM: > node -e “try{require(’./postinstall’)}catch(e){}”
11:38:55 PM: > core-js@3.15.2 postinstall /opt/build/repo/node_modules/core-js
11:38:55 PM: > node -e “try{require(’./postinstall’)}catch(e){}”
11:38:55 PM: > core-js-pure@3.15.2 postinstall /opt/build/repo/node_modules/core-js-pure
11:38:55 PM: > node -e “try{require(’./postinstall’)}catch(e){}”
11:38:55 PM: > ejs@2.7.4 postinstall /opt/build/repo/node_modules/ejs
11:38:55 PM: > node ./postinstall.js
11:38:58 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
11:38:58 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
11:38:58 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
11:38:58 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
11:38:58 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
11:38:58 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
11:38:58 PM: added 1947 packages from 737 contributors and audited 1953 packages in 33.759s
11:39:00 PM: 145 packages are looking for funding
11:39:00 PM: run npm fund for details
11:39:00 PM: found 3 moderate severity vulnerabilities
11:39:00 PM: run npm audit fix to fix them, or npm audit for details
11:39:00 PM: NPM modules installed
11:39:00 PM: Started restoring cached go cache
11:39:00 PM: Finished restoring cached go cache
11:39:00 PM: go version go1.14.4 linux/amd64
11:39:00 PM: go version go1.14.4 linux/amd64
11:39:00 PM: Installing missing commands
11:39:00 PM: Verify run directory
11:39:01 PM: ​
11:39:01 PM: ────────────────────────────────────────────────────────────────
11:39:01 PM: Netlify Build
11:39:01 PM: ────────────────────────────────────────────────────────────────
11:39:01 PM: ​
11:39:01 PM: ❯ Version
11:39:01 PM: @netlify/build 16.2.1
11:39:01 PM: ​
11:39:01 PM: ❯ Flags
11:39:01 PM: deployId: 60fd06d82853943c2f7f22c4
11:39:01 PM: ​
11:39:01 PM: ❯ Current directory
11:39:01 PM: /opt/build/repo
11:39:01 PM: ​
11:39:01 PM: ❯ Config file
11:39:01 PM: No config file was defined: using default values.
11:39:01 PM: ​
11:39:01 PM: ❯ Context
11:39:01 PM: production
11:39:01 PM: ​
11:39:01 PM: ────────────────────────────────────────────────────────────────
11:39:01 PM: 1. Build command from Netlify app
11:39:01 PM: ────────────────────────────────────────────────────────────────
11:39:01 PM: ​
11:39:01 PM: $ npm run build
11:39:01 PM: > dictionary-project@0.1.0 build /opt/build/repo
11:39:01 PM: > react-scripts build
11:39:03 PM: Creating an optimized production build…
11:39:14 PM:
11:39:14 PM: Treating warnings as errors because process.env.CI = true.
11:39:14 PM: Most CI servers set it automatically.
11:39:14 PM:
11:39:14 PM: Failed to compile.
11:39:14 PM:
11:39:14 PM: src/App.js
11:39:14 PM: Line 1:8: ‘logo’ is defined but never used no-unused-vars
11:39:14 PM: src/Photos.js
11:39:14 PM: Line 12:26: Anchors must have content and the content must be accessible by a screen reader jsx-a11y/anchor-has-content
11:39:14 PM: npm ERR! code ELIFECYCLE
11:39:14 PM: npm ERR! errno 1
11:39:14 PM: npm ERR! dictionary-project@0.1.0 build: react-scripts build
11:39:14 PM: npm ERR! Exit status 1
11:39:14 PM: npm ERR!
11:39:14 PM: npm ERR! Failed at the dictionary-project@0.1.0 build script.
11:39:14 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:39:14 PM: npm ERR! A complete log of this run can be found in:
11:39:14 PM: npm ERR! /opt/buildhome/.npm/_logs/2021-07-25T06_39_14_173Z-debug.log
11:39:14 PM: ​
11:39:14 PM: ────────────────────────────────────────────────────────────────
11:39:14 PM: “build.command” failed
11:39:14 PM: ────────────────────────────────────────────────────────────────
11:39:14 PM: ​
11:39:14 PM: Error message
11:39:14 PM: Command failed with exit code 1: npm run build
11:39:14 PM: ​
11:39:14 PM: Error location
11:39:14 PM: In Build command from Netlify app:
11:39:14 PM: npm run build
11:39:14 PM: ​
11:39:14 PM: Resolved config
11:39:14 PM: build:
11:39:14 PM: command: npm run build
11:39:14 PM: commandOrigin: ui
11:39:14 PM: publish: /opt/build/repo/build
11:39:14 PM: publishOrigin: ui
11:39:14 PM: Caching artifacts
11:39:14 PM: Started saving node modules
11:39:14 PM: Finished saving node modules
11:39:14 PM: Started saving build plugins
11:39:14 PM: Finished saving build plugins
11:39:14 PM: Started saving pip cache
11:39:14 PM: Finished saving pip cache
11:39:14 PM: Started saving emacs cask dependencies
11:39:14 PM: Finished saving emacs cask dependencies
11:39:14 PM: Started saving maven dependencies
11:39:14 PM: Finished saving maven dependencies
11:39:14 PM: Started saving boot dependencies
11:39:14 PM: Finished saving boot dependencies
11:39:14 PM: Started saving rust rustup cache
11:39:14 PM: Finished saving rust rustup cache
11:39:14 PM: Started saving go dependencies
11:39:14 PM: Finished saving go dependencies
11:39:17 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:39:17 PM: Creating deploy upload records
11:39:17 PM: Failing build: Failed to build site
11:39:17 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
11:39:17 PM: Finished processing build request in 59.347306609s
GitHub URL :GitHub - Zaina-coder/dictionary-project
Netlify URL : https://kind-easley-7cb276.netlify.app/

Hi @Zaina_coder

I believe that because of this…

These warnings caused the build to fail

So in src/App.js you have

import logo from "./shecode.png";

but you have not used logo anywhere.

As for the error in src/Photos.js, I think this is because you don’t have a title attribute, or don’t have ARIA attributes.

Hi @Zaina_coder,

Another fix would be to change your build command to CI= npm run build.