Netlify cached deploy

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

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:

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:

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

Actually, i figured it out. it was the bundle name, i just changed it with a content hash:

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

Now It worked fine

1 Like

hooray for you! great work, thanks for sharing.

1 Like