Skip to content

sourcebit-nextjs-cache.json Not Found #7

@slavakurilyak

Description

@slavakurilyak

I am running Stackbit v0.3.44, using Next.js as a web framework and Contentful as a CMS.

When I try to deploy, Netlify log shows me:

2:55:04 PM: Build ready to start
2:55:07 PM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
2:55:07 PM: build-image tag: v3.6.1
2:55:07 PM: buildbot version: 44655717ddf0e7bd7f856f5b1154254de54b1d80
2:55:07 PM: Fetching cached dependencies
2:55:07 PM: Starting to download cache of 100.4MB
2:55:08 PM: Finished downloading cache in 1.103787039s
2:55:08 PM: Starting to extract cache
2:55:13 PM: Finished extracting cache in 4.426850255s
2:55:13 PM: Finished fetching cache in 5.634974494s
2:55:13 PM: Starting to prepare the repo for build
2:55:13 PM: Preparing Git Reference refs/heads/master
2:55:16 PM: Starting build script
2:55:16 PM: Installing dependencies
2:55:16 PM: Python version set to 2.7
2:55:17 PM: Started restoring cached node version
2:55:19 PM: Finished restoring cached node version
2:55:20 PM: v12.18.0 is already installed.
2:55:21 PM: Now using node v12.18.0 (npm v6.14.4)
2:55:21 PM: Started restoring cached build plugins
2:55:21 PM: Finished restoring cached build plugins
2:55:21 PM: Attempting ruby version 2.7.1, read from environment
2:55:23 PM: Using ruby version 2.7.1
2:55:23 PM: Using PHP version 5.6
2:55:23 PM: Started restoring cached node modules
2:55:23 PM: Finished restoring cached node modules
2:55:24 PM: Installing NPM modules using NPM version 6.14.4
2:55:36 PM: npm WARN stackbit-diy-theme@0.0.1 No repository field.
2:55:36 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.1 (node_modules/webpack/node_modules/fsevents):
2:55:36 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:55:36 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
2:55:36 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
2:55:36 PM: added 39 packages from 18 contributors, removed 38 packages, updated 159 packages and audited 961 packages in 11.126s
2:55:36 PM: 40 packages are looking for funding
2:55:36 PM:   run `npm fund` for details
2:55:36 PM: found 5 vulnerabilities (2 low, 3 high)
2:55:36 PM:   run `npm audit fix` to fix them, or `npm audit` for details
2:55:36 PM: NPM modules installed
2:55:37 PM: Started restoring cached go cache
2:55:37 PM: Finished restoring cached go cache
2:55:37 PM: go version go1.14.4 linux/amd64
2:55:37 PM: go version go1.14.4 linux/amd64
2:55:37 PM: Installing missing commands
2:55:37 PM: Verify run directory
2:55:39 PM: ​
2:55:39 PM: ────────────────────────────────────────────────────────────────
2:55:39 PM:   Netlify Build                                                 
2:55:39 PM: ────────────────────────────────────────────────────────────────
2:55:39 PM: ​
2:55:39 PM: ❯ Version
2:55:39 PM:   @netlify/build 8.3.0
2:55:39 PM: ​
2:55:39 PM: ❯ Flags
2:55:39 PM:   deployId: 601340c85ac25d0bd9804cf2
2:55:39 PM:   mode: buildbot
2:55:39 PM: ​
2:55:39 PM: ❯ Current directory
2:55:39 PM:   /opt/build/repo
2:55:39 PM: ​
2:55:39 PM: ❯ Config file
2:55:39 PM:   /opt/build/repo/netlify.toml
2:55:39 PM: ​
2:55:39 PM: ❯ Context
2:55:39 PM:   production
2:55:39 PM: ​
2:55:39 PM: ────────────────────────────────────────────────────────────────
2:55:39 PM:   1. build.command from netlify.toml                            
2:55:39 PM: ────────────────────────────────────────────────────────────────
2:55:39 PM: ​
2:55:39 PM: $ ./stackbit-build.sh
2:55:39 PM: echo "stackbit-build.sh: start build"
2:55:39 PM: stackbit-build.sh: start build
2:55:39 PM: # build site
2:55:39 PM: npm run build
2:55:39 PM: > stackbit-diy-theme@0.0.1 build /opt/build/repo
2:55:39 PM: > next build && next export
2:55:40 PM: Browserslist: caniuse-lite is outdated. Please run:
2:55:40 PM: npx browserslist@latest --update-db
2:55:41 PM: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://err.sh/next.js/no-cache
2:55:41 PM: info  - Creating an optimized production build...
2:55:51 PM: ✖ An error occurred when processing the plugins: Cannot read property 'fields' of null.
2:56:13 PM: info  - Compiled successfully
2:56:13 PM: info  - Collecting page data...
2:56:14 PM: Page [...slug].js getStaticPaths
2:56:14 PM: SourcebitDataClient.getStaticPaths
2:56:14 PM: SourcebitDataClient.getData
2:56:14 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #1
2:56:14 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #2
2:56:15 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #3
2:56:15 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #4
2:56:16 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #5
2:56:16 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #6
2:56:17 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #7
2:56:17 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #8
2:56:18 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #9
2:56:18 PM: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found, waiting 500ms and retry #10
2:56:19 PM: > Build error occurred
2:56:19 PM: Error: SourcebitDataClient.getData, cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' was not found after 10 retries
2:56:19 PM:     at Timeout.checkPathExists [as _onTimeout] (/opt/build/repo/node_modules/sourcebit-target-next/index.js:362:25) {
2:56:19 PM:   type: 'Error'
2:56:19 PM: }
2:56:19 PM: npm ERR! code ELIFECYCLE
2:56:19 PM: npm ERR! errno 1
2:56:19 PM: npm ERR! stackbit-diy-theme@0.0.1 build: `next build && next export`
2:56:19 PM: npm ERR! Exit status 1
2:56:19 PM: npm ERR!
2:56:19 PM: npm ERR! Failed at the stackbit-diy-theme@0.0.1 build script.
2:56:19 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2:56:19 PM: npm ERR! A complete log of this run can be found in:
2:56:19 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-01-28T22_56_19_292Z-debug.log
2:56:19 PM: ​
2:56:19 PM: ────────────────────────────────────────────────────────────────
2:56:19 PM:   "build.command" failed                                        
2:56:19 PM: ────────────────────────────────────────────────────────────────
2:56:19 PM: ​
2:56:19 PM:   Error message
2:56:19 PM:   Command failed with exit code 1: ./stackbit-build.sh
2:56:19 PM: ​
2:56:19 PM:   Error location
2:56:19 PM:   In build.command from netlify.toml:
2:56:19 PM:   ./stackbit-build.sh
2:56:19 PM: ​
2:56:19 PM:   Resolved config
2:56:19 PM:   build:
2:56:19 PM:     command: ./stackbit-build.sh
2:56:19 PM:     commandOrigin: config
2:56:19 PM:     environment:
2:56:19 PM:       - CONTENTFUL_ACCESS_TOKEN
2:56:19 PM:       - CONTENTFUL_DELIVERY_TOKEN
2:56:19 PM:       - INCOMING_HOOK_BODY
2:56:19 PM:       - INCOMING_HOOK_TITLE
2:56:19 PM:       - INCOMING_HOOK_URL
2:56:19 PM:     publish: /opt/build/repo/out
2:56:19 PM: Caching artifacts
2:56:19 PM: Started saving node modules
2:56:19 PM: Finished saving node modules
2:56:19 PM: Started saving build plugins
2:56:19 PM: Finished saving build plugins
2:56:19 PM: Started saving pip cache
2:56:19 PM: Finished saving pip cache
2:56:19 PM: Started saving emacs cask dependencies
2:56:19 PM: Finished saving emacs cask dependencies
2:56:19 PM: Started saving maven dependencies
2:56:19 PM: Finished saving maven dependencies
2:56:19 PM: Started saving boot dependencies
2:56:19 PM: Finished saving boot dependencies
2:56:19 PM: Started saving rust rustup cache
2:56:19 PM: Finished saving rust rustup cache
2:56:19 PM: Started saving go dependencies
2:56:19 PM: Finished saving go dependencies
2:56:19 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
2:56:19 PM: Failing build: Failed to build site
2:56:19 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
2:56:19 PM: Finished processing build request in 1m12.469001017s

Two issues come up during the deployment:

  1. Cannot read property 'fields' of null.
  2. cache file '/opt/build/repo/.sourcebit-nextjs-cache.json' not found

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions