Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Error during Netlify build due to CSS issue on snackbar

1 replies
Last updated: Oct 26, 2021
👋 I am having this error on Netlify and not sure what triggers it. It says here something about css on snackbar
Oct 26, 2021, 3:51 AM
11:46:05 AM: Build ready to start
11:46:07 AM: build-image version: dd2f6d8803393d46ac35a4f752a5a46f254c0300
11:46:07 AM: build-image tag: v3.9.1
11:46:07 AM: buildbot version: 5f1a3c6e77d89b95b77370734ae1aecf3a51e9c1
11:46:07 AM: Fetching cached dependencies
11:46:07 AM: Failed to fetch cache, continuing with build
11:46:07 AM: Starting to prepare the repo for build
11:46:08 AM: No cached dependencies found. Cloning fresh repo
11:46:08 AM: git clone <https://github.com/ajmalafif/ajmalafif.com>
11:46:21 AM: Preparing Git Reference pull/519/head
11:46:21 AM: Parsing package.json dependencies
11:46:22 AM: Different build dir detected, going to use the one specified in the Netlify configuration file: '' versus '/' in the Netlify UI
11:46:22 AM: Starting build script
11:46:22 AM: Installing dependencies
11:46:22 AM: Python version set to 2.7
11:46:23 AM: v12.18.0 is already installed.
11:46:24 AM: Now using node v12.18.0 (npm v6.14.4)
11:46:24 AM: Started restoring cached build plugins
11:46:24 AM: Finished restoring cached build plugins
11:46:24 AM: Attempting ruby version 2.7.2, read from environment
11:46:26 AM: Using ruby version 2.7.2
11:46:26 AM: Using PHP version 5.6
11:46:26 AM: Started restoring cached node modules
11:46:26 AM: Finished restoring cached node modules
11:46:26 AM: Installing NPM modules using NPM version 6.14.4
11:46:32 AM: npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See <https://v8.dev/blog/math-random> for details.
11:46:36 AM: npm WARN deprecated request@2.88.2: request has been deprecated, see <https://github.com/request/request/issues/3142>
11:46:36 AM: npm WARN deprecated mkdirp-promise@5.0.1: This package is broken and no longer maintained. 'mkdirp' itself supports promises now, please switch to that.
11:46:37 AM: npm WARN deprecated har-validator@5.1.5: this library is no longer supported
11:46:37 AM: npm WARN deprecated resolve-url@0.2.1: <https://github.com/lydell/resolve-url#deprecated>
11:46:37 AM: npm WARN deprecated urix@0.1.0: Please see <https://github.com/lydell/urix#deprecated>
11:46:48 AM: > sanity-gatsby-blog@1.0.17 postinstall /opt/build/repo
11:46:48 AM: > lerna bootstrap
11:46:49 AM: lerna notice cli v3.22.1
11:46:49 AM: lerna info ci enabled
11:46:49 AM: lerna info Bootstrapping 2 packages
11:46:49 AM: lerna info Installing external dependencies
11:48:02 AM: lerna info Symlinking packages and binaries
11:48:02 AM: lerna success Bootstrapped 2 packages
11:48:03 AM: npm notice created a lockfile as package-lock.json. You should commit this file.
11:48:03 AM: npm WARN @octokit/plugin-request-log@1.0.4 requires a peer of @octokit/core@>=3 but none is installed. You must install peer dependencies yourself.
11:48:03 AM: added 786 packages from 388 contributors and audited 786 packages in 96.075s
11:48:03 AM: 45 packages are looking for funding
11:48:03 AM:   run `npm fund` for details
11:48:03 AM: found 29 vulnerabilities (11 moderate, 18 high)
11:48:03 AM:   run `npm audit fix` to fix them, or `npm audit` for details
11:48:04 AM: NPM modules installed
11:48:04 AM: Started restoring cached go cache
11:48:04 AM: Finished restoring cached go cache
11:48:04 AM: go version go1.14.4 linux/amd64
11:48:04 AM: go version go1.14.4 linux/amd64
11:48:04 AM: Installing missing commands
11:48:04 AM: Verify run directory
11:48:05 AM: 
11:48:05 AM: ────────────────────────────────────────────────────────────────
11:48:05 AM:   Netlify Build                                                 
11:48:05 AM: ────────────────────────────────────────────────────────────────
11:48:05 AM: 
11:48:05 AM: ❯ Version
11:48:05 AM:   @netlify/build 18.17.7
11:48:05 AM: 
11:48:05 AM: ❯ Flags
11:48:05 AM:   baseRelDir: true
11:48:05 AM:   buildId: 617779cc1e109c0007b8b601
11:48:05 AM:   deployId: 617779cc1e109c0007b8b603
11:48:05 AM: 
11:48:05 AM: ❯ Current directory
11:48:05 AM:   /opt/build/repo
11:48:05 AM: 
11:48:05 AM: ❯ Config file
11:48:05 AM:   No config file was defined: using default values.
11:48:05 AM: 
11:48:05 AM: ❯ Context
11:48:05 AM:   deploy-preview
11:48:05 AM: 
11:48:05 AM: ────────────────────────────────────────────────────────────────
11:48:05 AM:   1. Build command from Netlify app                             
11:48:05 AM: ────────────────────────────────────────────────────────────────
11:48:05 AM: 
11:48:05 AM: $ npm run build-studio && cp studio/netlify.toml studio/dist
11:48:06 AM: > sanity-gatsby-blog@1.0.17 build-studio /opt/build/repo
11:48:06 AM: > lerna bootstrap && cd studio && npm run build
11:48:06 AM: lerna notice cli v3.22.1
11:48:06 AM: lerna info ci enabled
11:48:06 AM: lerna info Bootstrapping 2 packages
11:48:07 AM: lerna info Symlinking packages and binaries
11:48:07 AM: lerna success Bootstrapped 2 packages
11:48:07 AM: > sanity-gatsby-blog-studio@1.0.13 build /opt/build/repo/studio
11:48:07 AM: > sanity build
11:48:44 AM: Error: Errors while building:
11:48:44 AM: ./node_modules/@sanity/base/lib/__legacy/@sanity/components/snackbar/SnackbarItem.css
11:48:44 AM: Module build failed: ModuleBuildError: Module build failed: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
11:48:44 AM:     at /opt/build/repo/studio/node_modules/postcss-import/index.js:193:24
11:48:44 AM:     at Array.map (<anonymous>)
11:48:44 AM:     at /opt/build/repo/studio/node_modules/postcss-import/index.js:192:15
11:48:44 AM:     at runMicrotasks (<anonymous>)
11:48:44 AM:     at async Promise.all (index 0)
11:48:44 AM:     at async Promise.all (index 0)
11:48:44 AM:     at /opt/build/repo/studio/node_modules/webpack/lib/NormalModule.js:195:19
11:48:44 AM:     at /opt/build/repo/studio/node_modules/loader-runner/lib/LoaderRunner.js:367:11
11:48:44 AM:     at /opt/build/repo/studio/node_modules/loader-runner/lib/LoaderRunner.js:233:18
11:48:44 AM:     at context.callback (/opt/build/repo/studio/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
11:48:44 AM:     at /opt/build/repo/studio/node_modules/postcss-loader/lib/index.js:194:71
11:48:44 AM:     at runMicrotasks (<anonymous>)
11:48:44 AM:  @ ./node_modules/@sanity/base/lib/__legacy/@sanity/components/snackbar/SnackbarItem.js 22:43-72
11:48:44 AM:  @ ./node_modules/@sanity/base/lib/__legacy/@sanity/components/snackbar/SnackbarProvider.js?sanityPart=part%3A%40sanity%2Fcomponents%2Fsnackbar%2Fprovider
11:48:44 AM:  @ ./node_modules/@sanity/base/lib/components/SanityRoot.js?sanityPart=part%3A%40sanity%2Fbase%2Fsanity-root
11:48:44 AM:  @ ./node_modules/@sanity/server/lib/browser/entry.js
11:48:44 AM:  @ multi ./node_modules/@sanity/server/lib/browser/entry.js
11:48:44 AM:     at buildStaticAssets (/opt/build/repo/studio/node_modules/@sanity/core/lib/actions/build/buildStaticAssets.js:131:13)
11:48:44 AM: npm ERR! code ELIFECYCLE
11:48:44 AM: npm ERR! errno 1
11:48:44 AM: npm ERR! sanity-gatsby-blog-studio@1.0.13 build: `sanity build`
11:48:44 AM: npm ERR! Exit status 1
11:48:44 AM: npm ERR!
11:48:44 AM: npm ERR! Failed at the sanity-gatsby-blog-studio@1.0.13 build script.
11:48:44 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:48:44 AM: npm ERR! A complete log of this run can be found in:
11:48:44 AM: npm ERR!     /opt/buildhome/.npm/_logs/2021-10-26T03_48_44_766Z-debug.log
11:48:44 AM: npm ERR! code ELIFECYCLE
11:48:44 AM: npm ERR! errno 1
11:48:44 AM: npm ERR! sanity-gatsby-blog@1.0.17 build-studio: `lerna bootstrap && cd studio && npm run build`
11:48:44 AM: npm ERR! Exit status 1
11:48:44 AM: npm ERR!
11:48:44 AM: npm ERR! Failed at the sanity-gatsby-blog@1.0.17 build-studio script.
11:48:44 AM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
11:48:44 AM: npm ERR! A complete log of this run can be found in:
11:48:44 AM: npm ERR!     /opt/buildhome/.npm/_logs/2021-10-26T03_48_44_783Z-debug.log
11:48:44 AM: 
11:48:44 AM: ────────────────────────────────────────────────────────────────
11:48:44 AM:   "build.command" failed                                        
11:48:44 AM: ────────────────────────────────────────────────────────────────
11:48:44 AM: 
11:48:44 AM:   Error message
11:48:44 AM:   Command failed with exit code 1: npm run build-studio && cp studio/netlify.toml studio/dist
11:48:44 AM: 
11:48:44 AM:   Error location
11:48:44 AM:   In Build command from Netlify app:
11:48:44 AM:   npm run build-studio && cp studio/netlify.toml studio/dist
11:48:44 AM: 
11:48:44 AM:   Resolved config
11:48:44 AM:   build:
11:48:44 AM:     base: /opt/build/repo
11:48:44 AM:     command: npm run build-studio && cp studio/netlify.toml studio/dist
11:48:44 AM:     commandOrigin: ui
11:48:44 AM:     environment:
11:48:44 AM:       - REVIEW_ID
11:48:44 AM:     publish: /opt/build/repo/studio/dist
11:48:44 AM:     publishOrigin: ui
11:48:45 AM: Caching artifacts
11:48:45 AM: Started saving node modules
11:48:45 AM: Finished saving node modules
11:48:45 AM: Started saving build plugins
11:48:45 AM: Finished saving build plugins
11:48:45 AM: Started saving pip cache
11:48:45 AM: Finished saving pip cache
11:48:45 AM: Started saving emacs cask dependencies
11:48:45 AM: Finished saving emacs cask dependencies
11:48:45 AM: Started saving maven dependencies
11:48:45 AM: Finished saving maven dependencies
11:48:45 AM: Started saving boot dependencies
11:48:45 AM: Finished saving boot dependencies
11:48:45 AM: Started saving rust rustup cache
11:48:45 AM: Finished saving rust rustup cache
11:48:45 AM: Started saving go dependencies
11:48:45 AM: Finished saving go dependencies
11:48:48 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:48:48 AM: Creating deploy upload records
11:48:48 AM: Failing build: Failed to build site
11:48:48 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
11:48:48 AM: Finished processing build request in 2m40.607749999s
Oct 26, 2021, 3:51 AM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?