Unable to deploy site with Yarn 4.0.2, cache broken?

Hi there,

I’m having problems deploying my NextJS site. I’m using yarn 4.0.2 as my package manager, but there seems to be something wrong with the cache.

3:23:57 PM: build-image version: 3ffff9df3d5419545acc1b673a54de348174406d (focal)
3:23:57 PM: buildbot version: 934981c85c779610e15ce549846b0bea212b283e
3:23:57 PM: Fetching cached dependencies
3:23:57 PM: Starting to download cache of 1.9GB
3:24:22 PM: Finished downloading cache in 24.798s
3:24:22 PM: Starting to extract cache
3:24:35 PM: Finished extracting cache in 13.321s
3:24:35 PM: Finished fetching cache in 38.278s
3:24:35 PM: Starting to prepare the repo for build
3:24:36 PM: Preparing Git Reference refs/heads/netlify-build-fix
3:24:38 PM: Starting to install dependencies
3:24:38 PM: Python version set to 3.8
3:24:38 PM: Attempting Ruby version 2.7.2, read from environment
3:24:39 PM: Using Ruby version 2.7.2
3:24:39 PM: Started restoring cached go cache
3:24:39 PM: Finished restoring cached go cache
3:24:39 PM: Installing Go version 1.17 (requested 1.17)
3:24:46 PM: go version go1.17 linux/amd64
3:24:47 PM: Using PHP version 8.0
3:24:47 PM: Started restoring cached Node.js version
3:24:48 PM: Finished restoring cached Node.js version
3:24:49 PM: v20.10.0 is already installed.
3:24:49 PM: Now using node v20.10.0 (npm v10.2.3)
3:24:49 PM: Enabling Node.js Corepack
3:24:49 PM: Started restoring cached build plugins
3:24:49 PM: Finished restoring cached build plugins
3:24:49 PM: Started restoring cached corepack dependencies
3:24:49 PM: Finished restoring cached corepack dependencies
3:24:49 PM: Started restoring cached yarn cache
3:24:49 PM: Finished restoring cached yarn cache
3:24:50 PM: No yarn workspaces detected
3:24:50 PM: Started restoring cached node modules
3:24:50 PM: Finished restoring cached node modules
3:24:50 PM: Installing npm packages using Yarn version 4.0.2
3:24:50 PM: ➤ YN0000: · Yarn 4.0.2
3:24:50 PM: ➤ YN0000: ┌ Resolution step
3:24:51 PM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1
3:24:51 PM: ➤ YN0000: └ Completed in 0s 220ms
3:24:51 PM: ➤ YN0000: ┌ Post-resolution validation
3:24:51 PM: ➤ YN0060: │ @chakra-ui/react is listed by your project with version 2.8.2, which doesn"t satisfy what @chakra-ui/storybook-addon (p83411) requests (0.0.0-dev-20230112160451).
➤ YN0060: │ react is listed by your project with version 18.2.0, which doesn"t satisfy what @storybook/addon-actions (p1eae0) and other dependencies request (^16.13.1 || ^17.0.1).
➤ YN0060: │ react-dom is listed by your project with version 18.2.0, which doesn"t satisfy what @storybook/react (pc166e) and other dependencies request (^16.8.0 || ^17.0.1).
➤ YN0060: │ react-i18next is listed by your project with version 11.18.6, which doesn"t satisfy what next-i18next (p1297e) requests (^13.3.1).
➤ YN0002: │ bankai-website@workspace:. doesn"t provide @next/env (p2e859), requested by next-sitemap.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide @storybook/addons (p7506e), requested by @chakra-ui/storybook-addon.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide @storybook/addons (pb2a35), requested by storybook-addon-next-router.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide @storybook/api (p512e6), requested by @chakra-ui/storybook-addon.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide @storybook/client-api (pdcb03), requested by storybook-addon-next-router.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide @storybook/components (p388c9), requested by @chakra-ui/storybook-addon.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide require-from-string (p07ffc), requested by @storybook/react.
➤ YN0002: │ bankai-website@workspace:. doesn"t provide webpack (pd4e4b), requested by babel-loader.
➤ YN0086: │ Some peer dependencies are incorrectly met; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
3:24:51 PM: ➤ YN0000: └ Completed
3:24:51 PM: ➤ YN0000: ┌ Fetch step
3:24:51 PM: ➤ YN0056: │ @aashutoshrathi/word-wrap@npm:1.2.6: Cache entry required but missing for @aashutoshrathi/word-wrap@npm:1.2.6
3:24:51 PM: ➤ YN0056: │ @ampproject/remapping@npm:2.2.1: Cache entry required but missing for @ampproject/remapping@npm:2.2.1
3:24:51 PM: ➤ YN0056: │ @babel/code-frame@npm:7.23.4: Cache entry required but missing for @babel/code-frame@npm:7.23.4
3:24:51 PM: ➤ YN0056: │ @babel/compat-data@npm:7.23.3: Cache entry required but missing for @babel/compat-data@npm:7.23.3
3:24:51 PM: ➤ YN0056: │ @babel/core@npm:7.12.9: Cache entry required but missing for @babel/core@npm:7.12.9
3:24:51 PM: ➤ YN0056: │ @babel/core@npm:7.23.3: Cache entry required but missing for @babel/core@npm:7.23.3
3:24:51 PM: ➤ YN0056: │ @babel/generator@npm:7.23.4: Cache entry required but missing for @babel/generator@npm:7.23.4
3:24:51 PM: ➤ YN0056: │ @babel/helper-annotate-as-pure@npm:7.22.5: Cache entry required but missing for @babel/helper-annotate-as-pure@npm:7.22.5
3:24:51 PM: ➤ YN0056: │ @babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15: Cache entry required but missing for @babel/helper-builder-binary-assignment-operator-visitor@npm:7.22.15
3:24:51 PM: ➤ YN0056: │ @babel/helper-compilation-targets@npm:7.22.15: Cache entry required but missing for @babel/helper-compilation-targets@npm:7.22.15
3:24:51 PM: ➤ YN0056: │ @babel/helper-create-class-features-plugin@npm:7.22.15: Cache entry required but missing for @babel/helper-create-class-features-plugin@npm:7.22.15
3:24:51 PM: ➤ YN0056: │ @babel/helper-create-regexp-features-plugin@npm:7.22.15: Cache entry required but missing for @babel/helper-create-regexp-features-plugin@npm:7.22.15
3:24:51 PM: ➤ YN0056: │ @babel/helper-define-polyfill-provider@npm:0.1.5: Cache entry required but missing for @babel/helper-define-polyfill-provider@npm:0.1.5
3:24:51 PM: ➤ YN0056: │ @babel/helper-define-polyfill-provider@npm:0.4.3: Cache entry required but missing for @babel/helper-define-polyfill-provider@npm:0.4.3
3:24:51 PM: ➤ YN0056: │ @babel/helper-environment-visitor@npm:7.22.20: Cache entry required but missing for @babel/helper-environment-visitor@npm:7.22.20
3:24:51 PM: ➤ YN0056: │ @babel/helper-function-name@npm:7.23.0: Cache entry required but missing for @babel/helper-function-name@npm:7.23.0
3:24:51 PM: ➤ YN0056: │ @babel/helper-hoist-variables@npm:7.22.5: Cache entry required but missing for @babel/helper-hoist-variables@npm:7.22.5
...
3:24:51 PM: ➤ YN0000: └ Completed
3:24:51 PM: ➤ YN0000: · Failed with errors in 0s 444ms
3:24:51 PM: Error during Yarn install
3:24:51 PM: Failing build: Failed to install dependencies
3:24:51 PM: Finished processing build request in 54.612s

My package.json:

{
  "name": "bankai-website",
  "version": "4.4.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "postbuild": "next-sitemap",
    "start": "next start",
    "lint": "next lint",
    "storybook": "start-storybook -p 6006 -s ./public STORYBOOK=true",
    "build-storybook": "build-storybook -s public STORYBOOK=true",
    "storyblok-backup-prod": "cd _storyblok-spaces && storyblok pull-components --space 167910",
    "storyblok-sync": "yarn storyblok-backup-prod && storyblok sync --type components,datasources --source 180267 --target 167910"
  },
  "dependencies": {
    "@chakra-ui/react": "^2.8.2",
    "@emotion/react": "^11.11.1",
    "@emotion/styled": "^11.11.0",
    "@storyblok/react": "^2.4.7",
    "crypto": "^1.0.1",
    "framer-motion": "^10.16.5",
    "i18next": "^23.6.0",
    "next": "13.4.19",
    "next-i18next": "^15.0.0",
    "next-sitemap": "^3.1.24",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "react-hook-form": "^7.34.2",
    "react-i18next": "^11.18.0",
    "react-icons": "^4.12.0",
    "react-syntax-highlighter": "^15.5.0",
    "storyblok-rich-text-react-renderer": "^2.9.0"
  },
  "devDependencies": {
    "@babel/core": "^7.18.10",
    "@chakra-ui/storybook-addon": "^4.0.16",
    "@storybook/addon-actions": "^6.5.16",
    "@storybook/addon-essentials": "^6.5.16",
    "@storybook/addon-interactions": "^6.5.16",
    "@storybook/addon-links": "^6.5.16",
    "@storybook/builder-webpack5": "^6.5.16",
    "@storybook/manager-webpack5": "^6.5.16",
    "@storybook/react": "^6.5.16",
    "@storybook/testing-library": "^0.0.13",
    "@types/node": "^17.0.23",
    "@types/react": "^18.0.3",
    "@types/react-dom": "18.0.0",
    "@types/react-syntax-highlighter": "^15.5.10",
    "babel-loader": "^8.2.5",
    "eslint": "8.13.0",
    "eslint-config-next": "12.1.4",
    "eslint-plugin-mdx": "^2.0.2",
    "node-fetch": "2",
    "storybook-addon-designs": "^6.3.1",
    "storybook-addon-next-router": "^4.0.2",
    "ts-dedent": "^2.2.0",
    "typescript": "^4.6.3"
  },
  "packageManager": "yarn@4.0.2"
}

My .yarnrc.yml:

nodeLinker: node-modules

Update: removing the packageManager from package.json does not seem to work. I now get a load of errors about “The platform “linux” is incompatible with this module”. Seems to again be related to the cache…?

4:27:38 PM: build-image version: 3ffff9df3d5419545acc1b673a54de348174406d (focal)
4:27:38 PM: buildbot version: 934981c85c779610e15ce549846b0bea212b283e
4:27:38 PM: Building without cache
4:27:38 PM: Starting to prepare the repo for build
4:27:39 PM: No cached dependencies found. Cloning fresh repo
4:27:39 PM: git clone --filter=blob:none git@gitlab.com:bankaihq/bankai/bankai-website-4.0
4:27:40 PM: Preparing Git Reference refs/heads/develop
4:27:42 PM: Starting to install dependencies
4:27:42 PM: Python version set to 3.8
4:27:42 PM: Attempting Ruby version 2.7.2, read from environment
4:27:43 PM: Using Ruby version 2.7.2
4:27:43 PM: Started restoring cached go cache
4:27:43 PM: Finished restoring cached go cache
4:27:43 PM: Installing Go version 1.17 (requested 1.17)
4:27:50 PM: go version go1.17 linux/amd64
4:27:50 PM: Using PHP version 8.0
4:27:51 PM: Downloading and installing node v20.10.0...
4:27:51 PM: Downloading https://nodejs.org/dist/v20.10.0/node-v20.10.0-linux-x64.tar.xz...
4:27:51 PM: Computing checksum with sha256sum
4:27:51 PM: Checksums matched!
4:27:54 PM: Now using node v20.10.0 (npm v10.2.3)
4:27:54 PM: Enabling Node.js Corepack
4:27:54 PM: Started restoring cached build plugins
4:27:54 PM: Finished restoring cached build plugins
4:27:54 PM: Started restoring cached corepack dependencies
4:27:54 PM: Finished restoring cached corepack dependencies
4:27:54 PM: Started restoring cached yarn cache
4:27:54 PM: Finished restoring cached yarn cache
4:27:54 PM: Installing Yarn version 1.22.10
4:27:54 PM: Preparing yarn@1.22.10 for immediate activation...
4:27:55 PM: No yarn workspaces detected
4:27:55 PM: Started restoring cached node modules
4:27:55 PM: Finished restoring cached node modules
4:27:55 PM: Installing npm packages using Yarn version 1.22.10
4:27:55 PM: yarn install v1.22.10
4:27:55 PM: [1/4] Resolving packages...
4:27:56 PM: [2/4] Fetching packages...
4:27:56 PM: warning Pattern ["strip-ansi@^6.0.1"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity/node_modules/strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping.
4:27:56 PM: warning Pattern ["string-width@^4.1.0"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
4:27:56 PM: warning Pattern ["strip-ansi@^6.0.0"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-strip-ansi-cjs-6.0.1-9e26c63d30f53443e9489495b2105d37b67a85d9-integrity/node_modules/strip-ansi-cjs" as pattern ["strip-ansi-cjs@npm:strip-ansi@^6.0.1"]. This could result in non-deterministic behavior, skipping.
4:27:56 PM: warning Pattern ["string-width@^4.2.3"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
4:27:56 PM: warning Pattern ["string-width@^4.2.0"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
4:27:56 PM: warning Pattern ["wrap-ansi@^7.0.0"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-wrap-ansi-cjs-7.0.0-67e145cff510a6a6984bdf1152911d69d2eb9e43-integrity/node_modules/wrap-ansi-cjs" as pattern ["wrap-ansi-cjs@npm:wrap-ansi@^7.0.0"]. This could result in non-deterministic behavior, skipping.
4:27:56 PM: warning Pattern ["string-width@^1.0.2 || 2 || 3 || 4"] is trying to unpack in the same destination "/opt/buildhome/.yarn_cache/v6/npm-string-width-cjs-4.2.3-269c7117d27b05ad2e536830a8ec895ef9c6d010-integrity/node_modules/string-width-cjs" as pattern ["string-width-cjs@npm:string-width@^4.2.0"]. This could result in non-deterministic behavior, skipping.
4:28:33 PM: info @next/swc-darwin-arm64@13.4.19: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@next/swc-darwin-arm64@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @next/swc-darwin-arm64@13.4.19: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @next/swc-darwin-x64@13.4.19: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@next/swc-darwin-x64@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @next/swc-linux-arm64-gnu@13.4.19: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info "@next/swc-linux-arm64-gnu@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @next/swc-linux-arm64-musl@13.4.19: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info "@next/swc-linux-arm64-musl@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @next/swc-win32-arm64-msvc@13.4.19: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@next/swc-win32-arm64-msvc@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @next/swc-win32-arm64-msvc@13.4.19: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @next/swc-win32-ia32-msvc@13.4.19: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@next/swc-win32-ia32-msvc@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @next/swc-win32-ia32-msvc@13.4.19: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @next/swc-win32-x64-msvc@13.4.19: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@next/swc-win32-x64-msvc@13.4.19" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @esbuild/android-arm@0.18.20: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@esbuild/android-arm@0.18.20" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @esbuild/android-arm@0.18.20: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @esbuild/android-arm64@0.18.20: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@esbuild/android-arm64@0.18.20" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @esbuild/android-arm64@0.18.20: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @esbuild/android-x64@0.18.20: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@esbuild/android-x64@0.18.20" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @esbuild/darwin-arm64@0.18.20: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@esbuild/darwin-arm64@0.18.20" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @esbuild/darwin-arm64@0.18.20: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @esbuild/darwin-x64@0.18.20: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@esbuild/darwin-x64@0.18.20" is an optional dependency and failed compatibility check. Excluding it from installation.
...
4:28:33 PM: info @parcel/watcher-android-arm64@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-android-arm64@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-android-arm64@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @parcel/watcher-darwin-arm64@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-darwin-arm64@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-darwin-arm64@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @parcel/watcher-darwin-x64@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-darwin-x64@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-freebsd-x64@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-freebsd-x64@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-linux-arm-glibc@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-linux-arm-glibc@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-linux-arm64-glibc@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-linux-arm64-glibc@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-linux-arm64-musl@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-linux-arm64-musl@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-win32-arm64@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-win32-arm64@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-win32-arm64@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @parcel/watcher-win32-ia32@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-win32-ia32@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: info @parcel/watcher-win32-ia32@2.3.0: The CPU architecture "x64" is incompatible with this module.
4:28:33 PM: info @parcel/watcher-win32-x64@2.3.0: The platform "linux" is incompatible with this module.
4:28:33 PM: info "@parcel/watcher-win32-x64@2.3.0" is an optional dependency and failed compatibility check. Excluding it from installation.
4:28:33 PM: [3/4] Linking dependencies...
4:28:33 PM: warning " > next-i18next@15.0.0" has incorrect peer dependency "react-i18next@^13.3.1".
4:28:33 PM: warning " > next-sitemap@3.1.55" has unmet peer dependency "@next/env@*".
4:28:33 PM: warning " > @chakra-ui/storybook-addon@5.1.0" has unmet peer dependency "@storybook/components@>=7.0.12".
4:28:33 PM: warning " > @chakra-ui/storybook-addon@5.1.0" has unmet peer dependency "@storybook/manager-api@>=7.0.12".
4:28:33 PM: warning " > @chakra-ui/storybook-addon@5.1.0" has unmet peer dependency "@storybook/preview-api@>=7.0.12".
4:28:33 PM: warning " > @chakra-ui/storybook-addon@5.1.0" has unmet peer dependency "@storybook/types@>=7.0.24".
4:28:33 PM: warning " > @storybook/addon-designs@7.0.5" has unmet peer dependency "@storybook/addon-docs@^7.0.0".
4:28:33 PM: warning " > @storybook/addon-designs@7.0.5" has unmet peer dependency "@storybook/addons@^7.0.0".
4:28:33 PM: warning " > @storybook/addon-designs@7.0.5" has unmet peer dependency "@storybook/components@^7.0.0".
4:28:33 PM: warning " > @storybook/addon-designs@7.0.5" has unmet peer dependency "@storybook/manager-api@^7.0.0".
4:28:33 PM: warning " > @storybook/addon-designs@7.0.5" has unmet peer dependency "@storybook/preview-api@^7.0.0".
4:28:33 PM: warning " > @storybook/addon-designs@7.0.5" has unmet peer dependency "@storybook/theming@^7.0.0".
4:28:33 PM: warning "@storybook/nextjs > css-loader@6.8.1" has unmet peer dependency "webpack@^5.0.0".
4:28:33 PM: warning "@storybook/nextjs > node-polyfill-webpack-plugin@2.0.1" has unmet peer dependency "webpack@>=5".
4:28:33 PM: warning "@storybook/nextjs > postcss-loader@7.3.3" has unmet peer dependency "webpack@^5.0.0".
4:28:33 PM: warning "@storybook/nextjs > sass-loader@12.6.0" has unmet peer dependency "webpack@^5.0.0".
4:28:33 PM: warning "@storybook/nextjs > style-loader@3.3.3" has unmet peer dependency "webpack@^5.0.0".
4:28:33 PM: warning " > babel-loader@8.3.0" has unmet peer dependency "webpack@>=2".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/sdk-node@0.39.1" has incorrect peer dependency "@opentelemetry/api@>=1.3.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-grpc > @opentelemetry/core@1.15.2" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-grpc > @opentelemetry/otlp-transformer@0.41.2" has incorrect peer dependency "@opentelemetry/api@>=1.3.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-grpc > @opentelemetry/resources@1.15.2" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-grpc > @opentelemetry/sdk-metrics@1.15.2" has incorrect peer dependency "@opentelemetry/api@>=1.3.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-proto > @opentelemetry/core@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-proto > @opentelemetry/otlp-transformer@0.39.1" has incorrect peer dependency "@opentelemetry/api@>=1.3.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-proto > @opentelemetry/resources@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-proto > @opentelemetry/sdk-metrics@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.3.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-trace-otlp-grpc > @opentelemetry/sdk-trace-base@1.15.2" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/sdk-node > @opentelemetry/sdk-trace-base@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/sdk-node > @opentelemetry/sdk-trace-node@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-grpc > @opentelemetry/otlp-transformer > @opentelemetry/sdk-logs@0.41.2" has incorrect peer dependency "@opentelemetry/api@>=1.4.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/exporter-metrics-otlp-proto > @opentelemetry/otlp-transformer > @opentelemetry/sdk-logs@0.39.1" has incorrect peer dependency "@opentelemetry/api@>=1.4.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/sdk-node > @opentelemetry/sdk-trace-node > @opentelemetry/context-async-hooks@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/sdk-node > @opentelemetry/sdk-trace-node > @opentelemetry/propagator-b3@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:33 PM: warning "netlify-cli > @netlify/build > @honeycombio/opentelemetry-node > @opentelemetry/sdk-node > @opentelemetry/sdk-trace-node > @opentelemetry/propagator-jaeger@1.13.0" has incorrect peer dependency "@opentelemetry/api@>=1.0.0 <1.5.0".
4:28:52 PM: [4/4] Building fresh packages...
4:28:57 PM: Failed during stage "Install dependencies": dependency_installation script returned non-zero exit code: 1
4:28:57 PM: error /opt/build/repo/node_modules/netlify-cli: Command failed.
4:28:57 PM: Exit code: 1
4:28:57 PM: Command: node ./scripts/postinstall.js
4:28:57 PM: Arguments:
4:28:57 PM: Directory: /opt/build/repo/node_modules/netlify-cli
4:28:57 PM: Output:
4:28:57 PM: /opt/build/repo/node_modules/wide-align/align.js:2
4:28:57 PM: var stringWidth = require("string-width")
4:28:57 PM:                   ^
4:28:57 PM: Error [ERR_REQUIRE_ESM]: require() of ES Module /opt/build/repo/node_modules/string-width/index.js from /opt/build/repo/node_modules/wide-align/align.js not supported.
4:28:57 PM: Instead change the require of index.js in /opt/build/repo/node_modules/wide-align/align.js to a dynamic import() which is available in all CommonJS modules.
4:28:57 PM:     at Object.<anonymous> (/opt/build/repo/node_modules/wide-align/align.js:2:19) {
4:28:57 PM:   code: "ERR_REQUIRE_ESM"
4:28:57 PM: }
4:28:57 PM: Node.js v20.10.0
4:28:57 PM: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
4:28:57 PM: Error during Yarn install
4:28:57 PM: Failing build: Failed to install dependencies
4:28:57 PM: Finished processing build request in 1m18.847s

For the platform linux is unsupported, it would look like you generated the lockfile on a different OS than Linux.

For the former issue, we’d need a reproduction repo if possible.

The lockfile is generated on MacOS.

I’m rolling back to NPM, I’m having a lot of problems with Yarn lately (both locally as well as when building on Netlify).