# Netlify cached deploy

**URL:** <https://answers.netlify.com/t/netlify-cached-deploy/13611>\
**Category:** Support\
**Tags:** deployment, building, netlify-newbie\
**Created:** [April 29, 2020, 5:37pm UTC](https://answers.netlify.com/t/netlify-cached-deploy/13611 "2020-04-29T17:37:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![metehus](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/metehus/32/10030_2.png) [@metehus](https://answers.netlify.com/u/metehus)\
**Post date:** [April 29, 2020, 5:37pm UTC](https://answers.netlify.com/t/netlify-cached-deploy/13611/1 "2020-04-29T17:37:40Z")

</div>

So, i have a website, the [https://musicorumapp.com](https://musicorumapp.com) which is also open souce: [GitHub - musicorum-app/web: Musicorum react powered website](https://github.com/musicorum-app/web)

I’ve just deployed some changes, but these changes haven’t updated to me. I also tried to clear the cache from cloudflare, but haven’t worked either.

I would like to know if there’s a configuration or some way to manually clear the cache and update the website for everyone.

I saw on some websites that using “Clear cache and deploy” can solve this, but somehow, when i use this, the deploy returns an error, but when deploying without cleaning the cache, it goes well. Here’s my build logs:

```auto
1:42:25 PM: Build ready to start
1:42:27 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
1:42:27 PM: build-image tag: v3.3.7
1:42:27 PM: buildbot version: d331edf8f2830b9225dc860f57842d866657c4f5
1:42:27 PM: Fetching cached dependencies
1:42:27 PM: Starting to download cache of 254.9KB
1:42:27 PM: Finished downloading cache in 68.665669ms
1:42:27 PM: Starting to extract cache
1:42:27 PM: Failed to fetch cache, continuing with build
1:42:27 PM: Starting to prepare the repo for build
1:42:28 PM: No cached dependencies found. Cloning fresh repo
1:42:28 PM: git clone https://github.com/musicorum-app/web
1:42:29 PM: Preparing Git Reference refs/heads/master
1:42:29 PM: Starting build script
1:42:29 PM: Installing dependencies
1:42:31 PM: Downloading and installing node v10.20.1...
1:42:31 PM: Downloading https://nodejs.org/dist/v10.20.1/node-v10.20.1-linux-x64.tar.xz...
1:42:31 PM: 
#####################################
1:42:31 PM: 51.4%
1:42:31 PM: 
#################
1:42:31 PM: ####################################################### 100.0%
1:42:31 PM: Computing checksum with sha256sum
1:42:31 PM: Checksums matched!
1:42:34 PM: Now using node v10.20.1 (npm v6.14.4)
1:42:34 PM: Attempting ruby version 2.6.2, read from environment
1:42:36 PM: Using ruby version 2.6.2
1:42:36 PM: Using PHP version 5.6
1:42:36 PM: Started restoring cached node modules
1:42:36 PM: Finished restoring cached node modules
1:42:36 PM: Installing NPM modules using NPM version 6.14.4
1:42:48 PM: npm
1:42:48 PM: WARN musicorum-web@2.0.0 No repository field.
1:42:48 PM: added 125 packages from 93 contributors and audited 12314 packages in 10.649s
1:42:49 PM: 22 packages are looking for funding
1:42:49 PM: run `npm fund` for details
1:42:49 PM: found 360 vulnerabilities (358 low, 2 moderate)
1:42:49 PM: run `npm audit fix` to fix them, or `npm audit` for details
1:42:49 PM: NPM modules installed
1:42:49 PM: Started restoring cached go cache
1:42:49 PM: Finished restoring cached go cache
1:42:49 PM: unset GOOS;
1:42:49 PM: unset GOARCH;
1:42:49 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
1:42:49 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
1:42:49 PM: go version >&2;
1:42:49 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
1:42:50 PM: go version go1.12 linux/amd64
1:42:50 PM: Installing missing commands
1:42:50 PM: Verify run directory
1:42:50 PM: Executing user command: npm run webpack
1:42:50 PM: > musicorum-web@2.0.0 webpack /opt/build/repo
1:42:50 PM: > babel-node ./node_modules/webpack/bin/webpack
1:42:50 PM: sh: 1: babel-node: not found
1:42:50 PM: npm
1:42:50 PM: ERR! code ELIFECYCLE
1:42:50 PM: npm
1:42:50 PM: ERR!
1:42:50 PM: syscall
1:42:50 PM: spawn
1:42:50 PM: npm
1:42:50 PM: ERR!
1:42:50 PM: file
1:42:50 PM: sh
1:42:50 PM: npm
1:42:50 PM: ERR!
1:42:50 PM: errno
1:42:50 PM: ENOENT
1:42:50 PM: npm
1:42:50 PM: ERR! musicorum-web@2.0.0 webpack: `babel-node ./node_modules/webpack/bin/webpack`
1:42:50 PM: npm
1:42:50 PM: ERR! spawn ENOENT
1:42:50 PM: npm
1:42:50 PM: ERR!
1:42:50 PM: npm ERR!
1:42:50 PM: Failed at the musicorum-web@2.0.0 webpack script.
1:42:50 PM: npm
1:42:50 PM: ERR! This is probably not a problem with npm. There is likely additional logging output above.
1:42:50 PM: npm ERR! A complete log of this run can be found in:
1:42:50 PM: npm ERR! /opt/buildhome/.npm/_logs/2020-04-29T16_42_50_413Z-debug.log
1:42:50 PM: Skipping functions preparation step: no functions directory set
1:42:50 PM: Caching artifacts
1:42:50 PM: Started saving node modules
1:42:50 PM: Finished saving node modules
1:42:50 PM: Started saving pip cache
1:42:50 PM: Finished saving pip cache
1:42:50 PM: Started saving emacs cask dependencies
1:42:50 PM: Finished saving emacs cask dependencies
1:42:50 PM: Started saving maven dependencies
1:42:50 PM: Finished saving maven dependencies
1:42:50 PM: Started saving boot dependencies
1:42:50 PM: Finished saving boot dependencies
1:42:50 PM: Started saving go dependencies
1:42:50 PM: Finished saving go dependencies
1:42:56 PM: Error running command: Build script returned non-zero exit code: 1
1:42:56 PM: Failing build: Failed to build site
1:42:56 PM: failed during stage 'building site': Build script returned non-zero exit code: 1
1:42:56 PM: Finished processing build request in 28.635991487s

```

Here’s my deploy settings:

 ![Screenshot_20200429-143450_Chrome](https://global.discourse-cdn.com/netlify/original/2X/a/aaeec6a282d0e13b83540c735fe1eae1ceee5133.jpeg)

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [April 29, 2020, 6:39pm UTC](https://answers.netlify.com/t/netlify-cached-deploy/13611/2 "2020-04-29T18:39:46Z")

</div>

hmmmm this is a little odd. Could you share your package.json please? thanks.

---

<div class="post-metadata">

**Author:** ![metehus](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/metehus/32/10030_2.png) [@metehus](https://answers.netlify.com/u/metehus)\
**Post date:** [April 29, 2020, 9:00pm UTC](https://answers.netlify.com/t/netlify-cached-deploy/13611/3 "2020-04-29T21:00:44Z")

</div>

Actually, i figured it out. it was the bundle name, i just [changed it](https://github.com/musicorum-app/web/commit/9f3631a3726eb7ff7f2da8d351491271ef12f786) with a content hash:

```diff
  output: {
    path: path.join(__dirname, 'dist'),
  - filename: 'index.bundle.js',
  + filename: 'bundle.[contenthash].js',
    publicPath: '/'
  },

```

Now It worked fine

---

<div class="post-metadata">

**Author:** ![perry](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/perry/32/16_2.png) [@perry](https://answers.netlify.com/u/perry)\
**Post date:** [April 29, 2020, 9:24pm UTC](https://answers.netlify.com/t/netlify-cached-deploy/13611/4 "2020-04-29T21:24:43Z")

</div>

hooray for you! great work, thanks for sharing.
