Hey, i have a problem in deployment of my todo app

stuck in the deployment . it is saying “build.command” failed

           6:10:39 AM: Build ready to start

6:10:41 AM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
6:10:41 AM: build-image tag: v3.6.1
6:10:41 AM: buildbot version: d35018babe252245044d3565f193fa426818b4b1
6:10:41 AM: Fetching cached dependencies
6:10:41 AM: Failed to fetch cache, continuing with build
6:10:41 AM: Starting to prepare the repo for build
6:10:42 AM: No cached dependencies found. Cloning fresh repo
6:10:42 AM: git clone GitHub - ameyjakate2001/todo-ap
6:10:42 AM: Preparing Git Reference refs/heads/master
6:10:43 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘dist’ versus ‘dist/’ in the Netlify UI
6:10:44 AM: Starting build script
6:10:44 AM: Installing dependencies
6:10:44 AM: Python version set to 2.7
6:10:45 AM: v12.18.0 is already installed.
6:10:46 AM: Now using node v12.18.0 (npm v6.14.4)
6:10:46 AM: Started restoring cached build plugins
6:10:46 AM: Finished restoring cached build plugins
6:10:46 AM: Attempting ruby version 2.7.1, read from environment
6:10:47 AM: Using ruby version 2.7.1
6:10:48 AM: Using PHP version 5.6
6:10:48 AM: Started restoring cached node modules
6:10:48 AM: Finished restoring cached node modules
6:10:48 AM: Installing NPM modules using NPM version 6.14.4
6:10:49 AM: npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
6:10:51 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request · GitHub
6:10:51 AM: npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to “coffeescript” (no hyphen)
6:10:51 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
6:10:52 AM: npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
6:10:53 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
6:10:54 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
6:10:55 AM: npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
6:10:59 AM: npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
6:10:59 AM: npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
6:11:13 AM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
6:11:13 AM: > node -e “try{require(‘./postinstall’)}catch(e){}”
6:11:14 AM: > uglifyjs-webpack-plugin@0.4.6 postinstall /opt/build/repo/node_modules/uglifyjs-webpack-plugin
6:11:14 AM: > node lib/post_install.js
6:11:14 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
6:11:14 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
6:11:14 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:11:14 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
6:11:14 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:11:14 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
6:11:14 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
6:11:14 AM: added 992 packages from 665 contributors and audited 995 packages in 25.891s
6:11:15 AM: 34 packages are looking for funding
6:11:15 AM: run npm fund for details
6:11:15 AM: found 5 vulnerabilities (3 low, 1 moderate, 1 high)
6:11:15 AM: run npm audit fix to fix them, or npm audit for details
6:11:15 AM: NPM modules installed
6:11:15 AM: Started restoring cached go cache
6:11:15 AM: Finished restoring cached go cache
6:11:15 AM: go version go1.14.4 linux/amd64
6:11:15 AM: go version go1.14.4 linux/amd64
6:11:15 AM: Installing missing commands
6:11:15 AM: Verify run directory
6:11:17 AM: ​
6:11:17 AM: ────────────────────────────────────────────────────────────────
6:11:17 AM: Netlify Build
6:11:17 AM: ────────────────────────────────────────────────────────────────
6:11:17 AM: ​
6:11:17 AM: ❯ Version
6:11:17 AM: @netlify/build 9.0.0
6:11:17 AM: ​
6:11:17 AM: ❯ Flags
6:11:17 AM: deployId: 601d51df8baccaf45b32fc74
6:11:17 AM: mode: buildbot
6:11:17 AM: ​
6:11:17 AM: ❯ Current directory
6:11:17 AM: /opt/build/repo
6:11:17 AM: ​
6:11:17 AM: ❯ Config file
6:11:17 AM: No config file was defined: using default values.
6:11:17 AM: ​
6:11:17 AM: ❯ Context
6:11:17 AM: production
6:11:17 AM: ​
6:11:17 AM: ────────────────────────────────────────────────────────────────
6:11:17 AM: 1. Build command from Netlify app
6:11:17 AM: ────────────────────────────────────────────────────────────────
6:11:17 AM: ​
6:11:17 AM: $ npm run build
6:11:18 AM: > vuejs-todo@1.0.0 build /opt/build/repo
6:11:18 AM: > cross-env NODE_ENV=production webpack --progress --hide-modules
6:11:18 AM: No configuration file found and no output filename configured via CLI option.
6:11:18 AM: A configuration file could be named ‘webpack.config.js’ in the current directory.
6:11:18 AM: Use --help to display the CLI options.
6:11:18 AM: npm ERR! code ELIFECYCLE
6:11:18 AM: npm ERR! errno 255
6:11:18 AM: npm ERR! vuejs-todo@1.0.0 build: cross-env NODE_ENV=production webpack --progress --hide-modules
6:11:18 AM: npm ERR! Exit status 255
6:11:18 AM: npm ERR!
6:11:18 AM: npm ERR! Failed at the vuejs-todo@1.0.0 build script.
6:11:18 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
6:11:18 AM: npm ERR! A complete log of this run can be found in:
6:11:18 AM: npm ERR! /opt/buildhome/.npm/_logs/2021-02-05T14_11_18_574Z-debug.log
6:11:18 AM: ​
6:11:18 AM: ────────────────────────────────────────────────────────────────
6:11:18 AM: “build.command” failed //here it is failing
6:11:18 AM: ────────────────────────────────────────────────────────────────
6:11:18 AM: ​
6:11:18 AM: Error message
6:11:18 AM: Command failed with exit code 255: npm run build
6:11:18 AM: ​
6:11:18 AM: Error location
6:11:18 AM: In Build command from Netlify app:
6:11:18 AM: npm run build
6:11:18 AM: ​
6:11:18 AM: Resolved config
6:11:18 AM: build:
6:11:18 AM: command: npm run build
6:11:18 AM: commandOrigin: ui
6:11:18 AM: publish: /opt/build/repo/dist
6:11:18 AM: Caching artifacts
6:11:18 AM: Started saving node modules
6:11:18 AM: Finished saving node modules
6:11:18 AM: Started saving build plugins
6:11:18 AM: Finished saving build plugins
6:11:18 AM: Started saving pip cache
6:11:18 AM: Finished saving pip cache
6:11:18 AM: Started saving emacs cask dependencies
6:11:18 AM: Finished saving emacs cask dependencies
6:11:18 AM: Started saving maven dependencies
6:11:18 AM: Finished saving maven dependencies
6:11:18 AM: Started saving boot dependencies
6:11:18 AM: Finished saving boot dependencies
6:11:18 AM: Started saving rust rustup cache
6:11:18 AM: Finished saving rust rustup cache
6:11:18 AM: Started saving go dependencies
6:11:18 AM: Finished saving go dependencies
6:11:21 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
6:11:21 AM: Failing build: Failed to build site
6:11:21 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
6:11:21 AM: Finished processing build request in 40.408521032s

git link:- git-link

deployement

:
stuck in this from 2days . any help will be appreciated. Thank You

Your repo is missing webpack config file.

The real problem is, your website is existing inside a folder while your package.json is outside it. Move it all to the root of the repo.

hey now it is deployed successfully bt , showing page not found …You can view my git for structure.

You’re probably not building the website or your publish path is wrong. Share the build log please.

Here it is ,

 7:11:42 AM: Build ready to start

7:11:44 AM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
7:11:44 AM: build-image tag: v3.6.1
7:11:44 AM: buildbot version: d35018babe252245044d3565f193fa426818b4b1
7:11:44 AM: Building without cache
7:11:44 AM: Starting to prepare the repo for build
7:11:44 AM: No cached dependencies found. Cloning fresh repo
7:11:44 AM: git clone GitHub - ameyjakate2001/todo-ap
7:11:45 AM: Preparing Git Reference refs/heads/master
7:11:47 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘dist’ versus ‘dist/’ in the Netlify UI
7:11:47 AM: Starting build script
7:11:47 AM: Installing dependencies
7:11:47 AM: Python version set to 2.7
7:11:48 AM: v12.18.0 is already installed.
7:11:49 AM: Now using node v12.18.0 (npm v6.14.4)
7:11:49 AM: Started restoring cached build plugins
7:11:49 AM: Finished restoring cached build plugins
7:11:50 AM: Attempting ruby version 2.7.1, read from environment
7:11:51 AM: Using ruby version 2.7.1
7:11:52 AM: Using PHP version 5.6
7:11:52 AM: Started restoring cached node modules
7:11:52 AM: Finished restoring cached node modules
7:11:52 AM: Installing NPM modules using NPM version 6.14.4
7:11:54 AM: npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
7:11:56 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request · GitHub
7:11:56 AM: npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to “coffeescript” (no hyphen)
7:11:57 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
7:11:58 AM: npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
7:11:59 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
7:11:59 AM: npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
7:12:00 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
7:12:05 AM: npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
7:12:05 AM: npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
7:12:21 AM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
7:12:21 AM: > node -e “try{require(‘./postinstall’)}catch(e){}”
7:12:22 AM: > uglifyjs-webpack-plugin@0.4.6 postinstall /opt/build/repo/node_modules/uglifyjs-webpack-plugin
7:12:22 AM: > node lib/post_install.js
7:12:22 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
7:12:22 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
7:12:22 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
7:12:22 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
7:12:22 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
7:12:22 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
7:12:22 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
7:12:22 AM: added 992 packages from 665 contributors and audited 995 packages in 29.363s
7:12:23 AM: 34 packages are looking for funding
7:12:23 AM: run npm fund for details
7:12:23 AM: found 5 vulnerabilities (3 low, 1 moderate, 1 high)
7:12:23 AM: run npm audit fix to fix them, or npm audit for details
7:12:23 AM: NPM modules installed
7:12:23 AM: Started restoring cached go cache
7:12:23 AM: Finished restoring cached go cache
7:12:23 AM: go version go1.14.4 linux/amd64
7:12:23 AM: go version go1.14.4 linux/amd64
7:12:23 AM: Installing missing commands
7:12:23 AM: Verify run directory
7:12:25 AM: ​
7:12:25 AM: ────────────────────────────────────────────────────────────────
7:12:25 AM: Netlify Build
7:12:25 AM: ────────────────────────────────────────────────────────────────
7:12:25 AM: ​
7:12:25 AM: ❯ Version
7:12:25 AM: @netlify/build 9.0.0
7:12:25 AM: ​
7:12:25 AM: ❯ Flags
7:12:25 AM: deployId: 601d602e3966b2f50106be43
7:12:25 AM: mode: buildbot
7:12:25 AM: ​
7:12:25 AM: ❯ Current directory
7:12:25 AM: /opt/build/repo
7:12:25 AM: ​
7:12:25 AM: ❯ Config file
7:12:25 AM: No config file was defined: using default values.
7:12:25 AM: ​
7:12:25 AM: ❯ Context
7:12:25 AM: production
7:12:25 AM: ​
7:12:25 AM: ────────────────────────────────────────────────────────────────
7:12:25 AM: 1. Build command from Netlify app
7:12:25 AM: ────────────────────────────────────────────────────────────────
7:12:25 AM: ​
7:12:25 AM: $ npm run build
7:12:26 AM: > vuejs-todo@1.0.0 build /opt/build/repo
7:12:26 AM: > cross-env NODE_ENV=production webpack --progress --hide-modules
7:12:26 AM: 0% compiling
7:12:27 AM: 10% building modules 0/1 modules 1 active …/index.js!/opt/build/repo/src/main.js
7:12:27 AM: 10% building modules 1/1 modules 0 active
7:12:27 AM: 10% building modules 1/2 modules 1 active …repo/node_modules/vue/dist/vue.esm.js
7:12:27 AM: 10% building modules 2/2 modules 0 active
7:12:27 AM: 10% building modules 2/3 modules 1 active …s??ref–1!/opt/build/repo/src/App.vue
7:12:27 AM: 10% building modules 2/4 modules 2 active …ode_modules/timers-browserify/main.js
7:12:27 AM: 10% building modules 3/4 modules 1 active …ode_modules/timers-browserify/main.js
7:12:27 AM: 10% building modules 3/5 modules 2 active …ode_modules/webpack/buildin/global.js
7:12:27 AM: 10% building modules 4/5 modules 1 active …ode_modules/webpack/buildin/global.js
7:12:27 AM: 10% building modules 5/5 modules 0 active
7:12:27 AM: 10% building modules 5/6 modules 1 active …t&index=0!/opt/build/repo/src/App.vue
7:12:27 AM: 10% building modules 6/6 modules 0 active
7:12:28 AM: 10% building modules 6/7 modules 1 active …e&index=0!/opt/build/repo/src/App.vue
7:12:28 AM: 10% building modules 7/7 modules 0 active
7:12:28 AM: 10% building modules 7/8 modules 1 active …ue-loader/lib/component-normalizer.js
7:12:28 AM: 10% building modules 7/9 modules 2 active …uild/repo/src/components/AddTodos.vue
7:12:28 AM: 10% building modules 7/10 modules 3 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 10% building modules 8/10 modules 2 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 11% building modules 9/10 modules 1 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 11% building modules 9/11 modules 2 active …uild/repo/src/components/AddTodos.vue
7:12:28 AM: 11% building modules 10/11 modules 1 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 11% building modules 11/11 modules 0 active
7:12:28 AM: 11% building modules 11/12 modules 1 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 11% building modules 12/12 modules 0 active
7:12:28 AM: 11% building modules 12/13 modules 1 active …uild/repo/src/components/AddTodos.vue
7:12:28 AM: 11% building modules 12/14 modules 2 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 11% building modules 13/14 modules 1 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 11% building modules 14/14 modules 0 active
7:12:28 AM: 11% building modules 14/15 modules 1 active …s&index=0!/opt/build/repo/src/App.vue
7:12:28 AM: 11% building modules 15/15 modules 0 active
7:12:28 AM: 11% building modules 15/16 modules 1 active …uild/repo/src/components/AddTodos.vue
7:12:28 AM: 11% building modules 16/16 modules 0 active
7:12:28 AM: 11% building modules 16/17 modules 1 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 12% building modules 17/17 modules 0 active
7:12:28 AM: 12% building modules 17/18 modules 1 active …s&index=0!/opt/build/repo/src/App.vue
7:12:28 AM: 12% building modules 17/19 modules 2 active …uild/repo/src/components/AddTodos.vue
7:12:28 AM: 12% building modules 17/20 modules 3 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 12% building modules 17/21 modules 4 active …e-style-loader/lib/addStylesClient.js
7:12:28 AM: 12% building modules 17/22 modules 5 active …_modules/setimmediate/setImmediate.js
7:12:28 AM: 12% building modules 18/22 modules 4 active …_modules/setimmediate/setImmediate.js
7:12:28 AM: 12% building modules 19/22 modules 3 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 12% building modules 19/23 modules 4 active …/vue-style-loader/lib/listToStyles.js
7:12:28 AM: 12% building modules 19/24 modules 5 active …/repo/node_modules/process/browser.js
7:12:28 AM: 12% building modules 20/24 modules 4 active …/repo/node_modules/process/browser.js
7:12:28 AM: 12% building modules 21/24 modules 3 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 12% building modules 22/24 modules 2 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 12% building modules 23/24 modules 1 active …/build/repo/src/components/mytodo.vue
7:12:28 AM: 12% building modules 24/24 modules 0 active
7:12:28 AM: 12% building modules 24/25 modules 1 active …de_modules/css-loader/lib/css-base.js
7:12:28 AM: 13% building modules 25/25 modules 0 active
7:12:28 AM: 71% sealing
7:12:28 AM: 72% optimizing
7:12:28 AM: 73% basic module optimization
7:12:28 AM: 74% module optimization
7:12:28 AM: 75% advanced module optimization
7:12:28 AM: 76% basic chunk optimization
7:12:28 AM: 77% chunk optimization
7:12:28 AM: 78% advanced chunk optimization
7:12:28 AM: 79% module and chunk tree optimization
7:12:28 AM: 80% chunk modules optimization
7:12:28 AM: 81% advanced chunk modules optimization
7:12:28 AM: 82% module reviving
7:12:28 AM: 83% module order optimization
7:12:28 AM: 84% module id optimization
7:12:28 AM: 85% chunk reviving
7:12:28 AM: 86% chunk order optimization
7:12:28 AM: 87% chunk id optimization
7:12:28 AM: 88% hashing
7:12:28 AM: 89% module assets processing
7:12:28 AM: 90% chunk assets processing
7:12:28 AM: 91% additional chunk assets processing
7:12:28 AM: 92% recording
7:12:32 AM: Creating deploy upload records
7:12:31 AM: 91% additional asset processing
7:12:32 AM: 92% chunk asset optimization
7:12:32 AM: 94% asset optimization
7:12:32 AM: 95% emitting
7:12:32 AM: Hash: 819081c4bbd012b6ae80
7:12:32 AM: Starting post processing
7:12:32 AM: Version: webpack 3.12.0
7:12:32 AM: Time: 5304ms
7:12:32 AM: Post processing - HTML
7:12:32 AM: Asset Size Chunks Chunk Names
7:12:32 AM: build.js 110 kB 0 [emitted] main
7:12:32 AM: build.js.map 951 kB 0 [emitted] main
7:12:32 AM: ​
7:12:32 AM: Post processing - header rules
7:12:32 AM: (build.command completed in 6.3s)
7:12:32 AM: ​
7:12:32 AM: ────────────────────────────────────────────────────────────────
7:12:32 AM: 2. Deploy site
7:12:32 AM: ────────────────────────────────────────────────────────────────
7:12:32 AM: Post processing - redirect rules
7:12:32 AM: ​
7:12:32 AM: Starting to deploy site from ‘dist’
7:12:32 AM: Creating deploy tree
7:12:32 AM: 0 new files to upload
7:12:33 AM: Post processing done
7:12:32 AM: 0 new functions to upload
7:12:32 AM: Site deploy was successfully initiated
7:12:32 AM: ​
7:12:32 AM: (Deploy site completed in 652ms)
7:12:32 AM: ​
7:12:32 AM: ────────────────────────────────────────────────────────────────
7:12:32 AM: Netlify Build Complete
7:12:32 AM: ────────────────────────────────────────────────────────────────
7:12:32 AM: ​
7:12:32 AM: (Netlify Build completed in 7s)
7:12:32 AM: Caching artifacts
7:12:32 AM: Started saving node modules
7:12:32 AM: Finished saving node modules
7:12:32 AM: Started saving build plugins
7:12:33 AM: Finished saving build plugins
7:12:33 AM: Started saving pip cache
7:12:33 AM: Finished saving pip cache
7:12:33 AM: Started saving emacs cask dependencies
7:12:33 AM: Finished saving emacs cask dependencies
7:12:33 AM: Started saving maven dependencies
7:12:33 AM: Finished saving maven dependencies
7:12:33 AM: Started saving boot dependencies
7:12:33 AM: Finished saving boot dependencies
7:12:33 AM: Started saving rust rustup cache
7:12:33 AM: Site is live :sparkles:
7:12:33 AM: Finished saving rust rustup cache
7:12:33 AM: Started saving go dependencies
7:12:33 AM: Finished saving go dependencies
7:12:36 AM: Build script success
7:12:50 AM: Finished processing build request in 1m6.565937227s

There’s a possibility that your code is not generating any index.html file in the dist folder. Could you please check it?

You can check it be either building the website locally or by downloading the deployed website from Netlify UI.

i downloaded the deployed website … downloaded as build.js and build.js.map…
how to run them ??

So it seems like your source code is not rendering a HTML page. If that’s the case, it won’t work on Netlify.

so now it will not work ?

Without an index.html, no. I’ll still check the repo in a while and give it a go.

yes please …
it will be very helpful !!!

Okay so, I just tried your repo and there’s a good news. Seems like the required index.html is getting generated after all.

Change your build command to: npm run build && cp /index.html /publish/ && cp -a /dist/. /publish/ and then change your publish path to publish.

Why the above command? Because your configuration is generating the index.html in the root of the project itself. Due to this, if you keep publish path empty, Netlify would try to publish node_modules folder too which might end in an error. Thus, you’d have to copy your index.html and dist folder’s contents to a new folder.

means,
Build Command :- npm run build && cp /index.html /publish/ && cp -a /dist/. /publish/
and
Publish directory : publish ?

Yes. Give it a try and let me know how it goes.

9:59:37 AM: Build ready to start
9:59:39 AM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
9:59:39 AM: build-image tag: v3.6.1
9:59:39 AM: buildbot version: d35018babe252245044d3565f193fa426818b4b1
9:59:39 AM: Building without cache
9:59:39 AM: Starting to prepare the repo for build
9:59:40 AM: No cached dependencies found. Cloning fresh repo
9:59:40 AM: git clone GitHub - ameyjakate2001/todo-ap
9:59:40 AM: Preparing Git Reference refs/heads/master
9:59:42 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: ‘opt/build/repo/publish’ versus ‘/opt/build/repo/publish’ in the Netlify UI
9:59:42 AM: Starting build script
9:59:42 AM: Installing dependencies
9:59:42 AM: Python version set to 2.7
9:59:43 AM: v12.18.0 is already installed.
9:59:44 AM: Now using node v12.18.0 (npm v6.14.4)
9:59:44 AM: Started restoring cached build plugins
9:59:44 AM: Finished restoring cached build plugins
9:59:44 AM: Attempting ruby version 2.7.1, read from environment
9:59:46 AM: Using ruby version 2.7.1
9:59:46 AM: Using PHP version 5.6
9:59:46 AM: Started restoring cached node modules
9:59:46 AM: Finished restoring cached node modules
9:59:46 AM: Installing NPM modules using NPM version 6.14.4
9:59:48 AM: npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
9:59:50 AM: npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
9:59:50 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request · GitHub
9:59:50 AM: npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to “coffeescript” (no hyphen)
9:59:51 AM: npm WARN deprecated core-js@2.6.12: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
9:59:52 AM: npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
9:59:53 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
9:59:54 AM: npm WARN deprecated browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
9:59:58 AM: npm WARN deprecated resolve-url@0.2.1: GitHub - lydell/resolve-url: [DEPRECATED] Like Node.js’ `path.resolve`/`url.resolve` for the browser.
9:59:58 AM: npm WARN deprecated urix@0.1.0: Please see GitHub - lydell/urix: [DEPRECATED] Makes Windows-style paths more unix and URI friendly.
10:00:14 AM: > core-js@2.6.12 postinstall /opt/build/repo/node_modules/core-js
10:00:14 AM: > node -e “try{require(‘./postinstall’)}catch(e){}”
10:00:14 AM: > uglifyjs-webpack-plugin@0.4.6 postinstall /opt/build/repo/node_modules/uglifyjs-webpack-plugin
10:00:14 AM: > node lib/post_install.js
10:00:15 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
10:00:15 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.1 (node_modules/chokidar/node_modules/fsevents):
10:00:15 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
10:00:15 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents):
10:00:15 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
10:00:15 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents):
10:00:15 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
10:00:15 AM: added 992 packages from 665 contributors and audited 995 packages in 28.178s
10:00:16 AM: 34 packages are looking for funding
10:00:16 AM: run npm fund for details
10:00:16 AM: found 5 vulnerabilities (3 low, 1 moderate, 1 high)
10:00:16 AM: run npm audit fix to fix them, or npm audit for details
10:00:16 AM: NPM modules installed
10:00:16 AM: Started restoring cached go cache
10:00:16 AM: Finished restoring cached go cache
10:00:16 AM: go version go1.14.4 linux/amd64
10:00:16 AM: go version go1.14.4 linux/amd64
10:00:16 AM: Installing missing commands
10:00:16 AM: Verify run directory
10:00:18 AM: ​
10:00:18 AM: ────────────────────────────────────────────────────────────────
10:00:18 AM: Netlify Build
10:00:18 AM: ────────────────────────────────────────────────────────────────
10:00:18 AM: ​
10:00:18 AM: ❯ Version
10:00:18 AM: @netlify/build 9.0.0
10:00:18 AM: ​
10:00:18 AM: ❯ Flags
10:00:18 AM: deployId: 601d8789bf0a3632b1eb03ca
10:00:18 AM: mode: buildbot
10:00:18 AM: ​
10:00:18 AM: ❯ Current directory
10:00:18 AM: /opt/build/repo
10:00:18 AM: ​
10:00:18 AM: ❯ Config file
10:00:18 AM: No config file was defined: using default values.
10:00:18 AM: ​
10:00:18 AM: ❯ Context
10:00:18 AM: production
10:00:18 AM: ​
10:00:18 AM: ────────────────────────────────────────────────────────────────
10:00:18 AM: 1. Build command from Netlify app
10:00:18 AM: ────────────────────────────────────────────────────────────────
10:00:18 AM: ​
10:00:18 AM: $ npm run build && cp /index.html /publish/ && cp -a /dist/. /publish/
10:00:18 AM: > vuejs-todo@1.0.0 build /opt/build/repo
10:00:18 AM: > cross-env NODE_ENV=production webpack --progress --hide-modules
10:00:19 AM: 0% compiling
10:00:19 AM: 10% building modules 0/1 modules 1 active …/index.js!/opt/build/repo/src/main.js
10:00:19 AM: 10% building modules 1/1 modules 0 active
10:00:20 AM: 10% building modules 1/2 modules 1 active …repo/node_modules/vue/dist/vue.esm.js
10:00:20 AM: 10% building modules 2/2 modules 0 active
10:00:20 AM: 10% building modules 2/3 modules 1 active …s??ref–1!/opt/build/repo/src/App.vue
10:00:20 AM: 10% building modules 3/3 modules 0 active
10:00:20 AM: 10% building modules 3/4 modules 1 active …ode_modules/timers-browserify/main.js
10:00:20 AM: 10% building modules 3/5 modules 2 active …ode_modules/webpack/buildin/global.js
10:00:20 AM: 10% building modules 3/6 modules 3 active …t&index=0!/opt/build/repo/src/App.vue
10:00:20 AM: 10% building modules 4/6 modules 2 active …ode_modules/webpack/buildin/global.js
10:00:20 AM: 10% building modules 4/7 modules 3 active …e&index=0!/opt/build/repo/src/App.vue
10:00:20 AM: 10% building modules 5/7 modules 2 active …ode_modules/webpack/buildin/global.js
10:00:20 AM: 10% building modules 6/7 modules 1 active …ode_modules/webpack/buildin/global.js
10:00:20 AM: 10% building modules 7/7 modules 0 active
10:00:20 AM: 10% building modules 7/8 modules 1 active …ue-loader/lib/component-normalizer.js
10:00:20 AM: 10% building modules 7/9 modules 2 active …uild/repo/src/components/AddTodos.vue
10:00:20 AM: 10% building modules 7/10 modules 3 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 10% building modules 8/10 modules 2 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 11% building modules 9/10 modules 1 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 11% building modules 9/11 modules 2 active …uild/repo/src/components/AddTodos.vue
10:00:20 AM: 11% building modules 10/11 modules 1 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 11% building modules 11/11 modules 0 active
10:00:20 AM: 11% building modules 11/12 modules 1 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 11% building modules 12/12 modules 0 active
10:00:20 AM: 11% building modules 12/13 modules 1 active …uild/repo/src/components/AddTodos.vue
10:00:20 AM: 11% building modules 12/14 modules 2 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 11% building modules 13/14 modules 1 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 11% building modules 14/14 modules 0 active
10:00:20 AM: 11% building modules 14/15 modules 1 active …s&index=0!/opt/build/repo/src/App.vue
10:00:20 AM: 11% building modules 15/15 modules 0 active
10:00:20 AM: 11% building modules 15/16 modules 1 active …uild/repo/src/components/AddTodos.vue
10:00:20 AM: 11% building modules 16/16 modules 0 active
10:00:20 AM: 11% building modules 16/17 modules 1 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 12% building modules 17/17 modules 0 active
10:00:20 AM: 12% building modules 17/18 modules 1 active …s&index=0!/opt/build/repo/src/App.vue
10:00:20 AM: 12% building modules 17/19 modules 2 active …uild/repo/src/components/AddTodos.vue
10:00:20 AM: 12% building modules 17/20 modules 3 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 12% building modules 17/21 modules 4 active …e-style-loader/lib/addStylesClient.js
10:00:20 AM: 12% building modules 18/21 modules 3 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 12% building modules 18/22 modules 4 active …_modules/setimmediate/setImmediate.js
10:00:20 AM: 12% building modules 19/22 modules 3 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 12% building modules 19/23 modules 4 active …/vue-style-loader/lib/listToStyles.js
10:00:20 AM: 12% building modules 20/23 modules 3 active …/build/repo/src/components/mytodo.vue
10:00:20 AM: 12% building modules 20/24 modules 4 active …/repo/node_modules/process/browser.js
10:00:21 AM: 12% building modules 21/24 modules 3 active …/build/repo/src/components/mytodo.vue
10:00:21 AM: 12% building modules 22/24 modules 2 active …/build/repo/src/components/mytodo.vue
10:00:21 AM: 12% building modules 23/24 modules 1 active …/build/repo/src/components/mytodo.vue
10:00:21 AM: 12% building modules 24/24 modules 0 active
10:00:21 AM: 12% building modules 24/25 modules 1 active …de_modules/css-loader/lib/css-base.js
10:00:21 AM: 13% building modules 25/25 modules 0 active
10:00:21 AM: 71% sealing
10:00:21 AM: 72% optimizing
10:00:21 AM: 73% basic module optimization
10:00:21 AM: 74% module optimization
10:00:21 AM: 75% advanced module optimization
10:00:21 AM: 76% basic chunk optimization
10:00:21 AM: 77% chunk optimization
10:00:21 AM: 78% advanced chunk optimization
10:00:21 AM: 79% module and chunk tree optimization
10:00:21 AM: 80% chunk modules optimization
10:00:21 AM: 81% advanced chunk modules optimization
10:00:21 AM: 82% module reviving
10:00:21 AM: 83% module order optimization
10:00:21 AM: 84% module id optimization
10:00:21 AM: 85% chunk reviving
10:00:21 AM: 86% chunk order optimization
10:00:21 AM: 87% chunk id optimization
10:00:21 AM: 88% hashing
10:00:21 AM: 89% module assets processing
10:00:21 AM: 90% chunk assets processing
10:00:21 AM: 91% additional chunk assets processing
10:00:21 AM: 92% recording
10:00:23 AM: 91% additional asset processing
10:00:24 AM: 92% chunk asset optimization
10:00:24 AM: 94% asset optimization
10:00:24 AM: 95% emitting
10:00:24 AM: Hash: 819081c4bbd012b6ae80
10:00:24 AM: Version: webpack 3.12.0
10:00:24 AM: Time: 4953ms
10:00:24 AM: Asset Size Chunks Chunk Names
10:00:24 AM: build.js 110 kB 0 [emitted] main
10:00:24 AM: build.js.map 951 kB 0 [emitted] main
10:00:24 AM: cp: cannot stat ‘/index.html’: No such file or directory
10:00:24 AM: ​
10:00:24 AM: ────────────────────────────────────────────────────────────────
10:00:24 AM: “build.command” failed
10:00:24 AM: ────────────────────────────────────────────────────────────────
10:00:24 AM: ​
10:00:24 AM: Error message
10:00:24 AM: Command failed with exit code 1: npm run build && cp /index.html /publish/ && cp -a /dist/. /publish/
10:00:24 AM: ​
10:00:24 AM: Error location
10:00:24 AM: In Build command from Netlify app:
10:00:24 AM: npm run build && cp /index.html /publish/ && cp -a /dist/. /publish/
10:00:24 AM: ​
10:00:24 AM: Resolved config
10:00:24 AM: build:
10:00:24 AM: command: npm run build && cp /index.html /publish/ && cp -a /dist/. /publish/
10:00:24 AM: commandOrigin: ui
10:00:24 AM: publish: /opt/build/repo/opt/build/repo/publish
10:00:24 AM: Caching artifacts
10:00:24 AM: Started saving node modules
10:00:24 AM: Finished saving node modules
10:00:24 AM: Started saving build plugins
10:00:24 AM: Finished saving build plugins
10:00:24 AM: Started saving pip cache
10:00:24 AM: Finished saving pip cache
10:00:24 AM: Started saving emacs cask dependencies
10:00:24 AM: Finished saving emacs cask dependencies
10:00:24 AM: Started saving maven dependencies
10:00:24 AM: Finished saving maven dependencies
10:00:24 AM: Started saving boot dependencies
10:00:24 AM: Finished saving boot dependencies
10:00:24 AM: Started saving rust rustup cache
10:00:24 AM: Finished saving rust rustup cache
10:00:24 AM: Started saving go dependencies
10:00:24 AM: Finished saving go dependencies
10:00:27 AM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2
10:00:27 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
10:00:27 AM: Failing build: Failed to build site
10:00:28 AM: Finished processing build request in 48.650172196s

Hiya, sorry you are having trouble with your build.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

okie i will try to search it there !!!

There’s another solution you can try:

  1. In the index.html in the root of your repo, change line 19 to: <script src="/build.js"></script>

  2. Move the above index.html from the root of your repo to the dist folder. Then keep your build command as before npm run build.

  3. Change your publish path back to dist.

It worked in my test. Should work for you too.

2 Likes

oh my god It works !!!
can’t say enough thanks in words …
Thank you so much man …