"Dependencies installation error" on Netlify but successful build locally

I am getting a successful build locally with the traditional yarn build (it takes forever but that is another story). However when I push my code to a deployment preview via a PR on github, after some time I get a failed build with the response:

Dependencies installation error Error message A Netlify Function failed to require one of its dependencies. Please make sure it is present in the site's top-level "package.json".

At first I thought it was the new @netlify/plugin-nextjs v3.2.0 but after downgrading to a project which successfully deploys with v3.1.0 I found no success.

Here is my build log & package.json

8:10:25 PM: Build ready to start 8:10:26 PM: build-image version: e4d2dbe4cfec46db257e869258461ded89b75c9b 8:10:26 PM: build-image tag: v3.7.3 8:10:26 PM: buildbot version: 2cb5794cb93042dadefe5dbdc6b35edc34c20454 8:10:26 PM: Fetching cached dependencies 8:10:27 PM: Failed to fetch cache, continuing with build 8:10:27 PM: Starting to prepare the repo for build 8:10:27 PM: No cached dependencies found. Cloning fresh repo 8:10:27 PM: git clone https://github.com/Futurity-Studio/website 8:10:32 PM: Preparing Git Reference pull/20/head 8:10:34 PM: Parsing package.json dependencies 8:10:35 PM: Different build command detected, going to use the one specified in the Netlify configuration file: 'npm run build' versus 'yarn deploy' in the Netlify UI 8:10:35 PM: Starting build script 8:10:35 PM: Installing dependencies 8:10:35 PM: Python version set to 2.7 8:10:36 PM: Downloading and installing node v10.24.1... 8:10:37 PM: Downloading https://nodejs.org/dist/v10.24.1/node-v10.24.1-linux-x64.tar.xz... 8:10:37 PM: Computing checksum with sha256sum 8:10:37 PM: Checksums matched! 8:10:39 PM: Now using node v10.24.1 (npm v6.14.12) 8:10:39 PM: Started restoring cached build plugins 8:10:39 PM: Finished restoring cached build plugins 8:10:40 PM: Attempting ruby version 2.6.2, read from environment 8:10:41 PM: Using ruby version 2.6.2 8:10:41 PM: Using PHP version 5.6 8:10:41 PM: Started restoring cached yarn cache 8:10:41 PM: Finished restoring cached yarn cache 8:10:41 PM: Installing yarn at version 1.17.0 8:10:41 PM: Installing Yarn! 8:10:41 PM: > Downloading tarball... 8:10:41 PM: [1/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz --> /tmp/yarn.tar.gz.tMq7HLLHuv 8:10:41 PM: % Total % Received % Xferd Average Speed Time Time Time Current 8:10:41 PM: Dload Upload Total Spent Left Speed 8:10:41 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 8:10:42 PM: 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 8:10:42 PM: 100 79 100 79 0 0 367 0 --:--:-- --:--:-- --:--:-- 367 8:10:42 PM: 100 93 100 93 0 0 159 0 --:--:-- --:--:-- --:--:-- 159 8:10:42 PM: 100 625 100 625 0 0 694 0 --:--:-- --:--:-- --:--:-- 694 8:10:43 PM: 0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0 8:10:43 PM: 100 1213k 100 1213k 0 0 932k 0 0:00:01 0:00:01 --:--:-- 5345k 8:10:43 PM: [2/2]: https://yarnpkg.com/downloads/1.17.0/yarn-v1.17.0.tar.gz.asc --> /tmp/yarn.tar.gz.tMq7HLLHuv.asc 8:10:43 PM: 100 83 100 83 0 0 1037 0 --:--:-- --:--:-- --:--:-- 1037 8:10:43 PM: 100 97 100 97 0 0 897 0 --:--:-- --:--:-- --:--:-- 897 8:10:43 PM: 100 629 100 629 0 0 2911 0 --:--:-- --:--:-- --:--:-- 2911 8:10:43 PM: 100 832 100 832 0 0 2681 0 --:--:-- --:--:-- --:--:-- 2681 8:10:43 PM: > Verifying integrity... 8:10:43 PM: gpg: Signature made Fri 14 Jun 2019 06:55:58 PM UTC using RSA key ID 69475BAA 8:10:43 PM: gpg: Good signature from "Yarn Packaging <yarn@dan.cx>" 8:10:43 PM: gpg: WARNING: This key is not certified with a trusted signature! 8:10:43 PM: gpg: There is no indication that the signature belongs to the owner. 8:10:43 PM: Primary key fingerprint: 72EC F46A 56B4 AD39 C907 BBB7 1646 B01B 86E5 0310 8:10:43 PM: Subkey fingerprint: 6D98 490C 6F1A CDDD 448E 4595 4F77 6793 6947 5BAA 8:10:43 PM: > GPG signature looks good 8:10:43 PM: > Extracting to ~/.yarn... 8:10:43 PM: > Adding to $PATH... 8:10:44 PM: > Successfully installed Yarn 1.17.0! Please open another terminal where the yarn command will now be available. 8:10:44 PM: NETLIFY_YARN_WORKSPACES feature flag set 8:10:44 PM: {"type":"error","data":"Cannot find the root of your workspace - are you sure you're currently in a workspace?"} 8:10:44 PM: No workspace detected 8:10:44 PM: Started restoring cached node modules 8:10:44 PM: Finished restoring cached node modules 8:10:44 PM: Installing NPM modules using Yarn version 1.17.0 8:10:45 PM: yarn install v1.17.0 8:10:45 PM: warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json. 8:10:45 PM: [1/4] Resolving packages... 8:10:46 PM: [2/4] Fetching packages... 8:11:20 PM: info @netlify/traffic-mesh-agent-darwin-x64@0.27.10: The platform "linux" is incompatible with this module. 8:11:20 PM: info "@netlify/traffic-mesh-agent-darwin-x64@0.27.10" is an optional dependency and failed compatibility check. Excluding it from installation. 8:11:20 PM: info @netlify/traffic-mesh-agent-win32-x64@0.27.10: The platform "linux" is incompatible with this module. 8:11:20 PM: info "@netlify/traffic-mesh-agent-win32-x64@0.27.10" is an optional dependency and failed compatibility check. Excluding it from installation. 8:11:20 PM: info fsevents@2.3.2: The platform "linux" is incompatible with this module. 8:11:20 PM: info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation. 8:11:20 PM: [3/4] Linking dependencies... 8:11:20 PM: warning " > image-trace-loader@1.0.2" has unmet peer dependency "file-loader@*". 8:11:20 PM: warning " > lottie-react@2.1.0" has unmet peer dependency "prop-types@^15.5.7". 8:11:20 PM: warning " > lottie-react@2.1.0" has incorrect peer dependency "react@^16.8.0". 8:11:20 PM: warning " > lottie-react@2.1.0" has incorrect peer dependency "react-dom@^16.8.0". 8:11:20 PM: warning " > lqip-loader@2.2.1" has unmet peer dependency "file-loader@*". 8:11:20 PM: warning "next-optimized-images > file-loader@3.0.1" has unmet peer dependency "webpack@^4.0.0". 8:11:20 PM: warning "next-optimized-images > raw-loader@2.0.0" has unmet peer dependency "webpack@^4.3.0". 8:11:20 PM: warning "next-optimized-images > url-loader@1.1.2" has unmet peer dependency "webpack@^3.0.0 || ^4.0.0". 8:11:20 PM: warning "next-pwa > babel-loader@8.2.2" has unmet peer dependency "@babel/core@^7.0.0". 8:11:20 PM: warning "next-pwa > babel-loader@8.2.2" has unmet peer dependency "webpack@>=2". 8:11:20 PM: warning "next-pwa > clean-webpack-plugin@3.0.0" has unmet peer dependency "webpack@*". 8:11:20 PM: warning "next-pwa > terser-webpack-plugin@5.1.1" has unmet peer dependency "webpack@^5.1.0". 8:11:20 PM: warning "next-pwa > workbox-webpack-plugin@6.1.5" has unmet peer dependency "webpack@^4.4.0 || ^5.9.0". 8:11:20 PM: warning " > react-icalendar-link@2.0.0" has unmet peer dependency "prop-types@^15.5.4". 8:11:20 PM: warning " > react-icalendar-link@2.0.0" has incorrect peer dependency "react@^15.0.0 || ^16.0.0". 8:11:20 PM: warning " > react-icalendar-link@2.0.0" has incorrect peer dependency "react-dom@^15.0.0 || ^16.0.0". 8:11:20 PM: warning " > react-normalize@0.4.4" has incorrect peer dependency "react@^16.6.3". 8:11:20 PM: warning " > react-normalize@0.4.4" has incorrect peer dependency "react-dom@^16.6.3". 8:11:20 PM: warning " > react-scrolllock@5.0.1" has incorrect peer dependency "react@^16.3.0". 8:11:20 PM: warning " > responsive-loader@2.3.0" has unmet peer dependency "webpack@^4.0.0 || ^5.0.0". 8:11:20 PM: warning " > webp-loader@0.6.0" has unmet peer dependency "webpack@*". 8:11:20 PM: warning " > webp-loader@0.6.0" has unmet peer dependency "webpack-cli@*". 8:11:20 PM: warning "@netlify/plugin-nextjs > @sls-next/lambda-at-edge > @zeit/node-file-trace > acorn-export-ns-from@0.1.0" has incorrect peer dependency "acorn@^6.0.1". 8:11:20 PM: warning "@netlify/plugin-nextjs > @sls-next/lambda-at-edge > @aws-sdk/client-s3 > @aws-sdk/middleware-retry > react-native-get-random-values@1.7.0" has unmet peer dependency "react-native@>=0.56". 8:11:36 PM: [4/4] Building fresh packages... 8:11:41 PM: Done in 55.79s. 8:11:41 PM: NPM modules installed using Yarn 8:11:41 PM: Started restoring cached go cache 8:11:41 PM: Finished restoring cached go cache 8:11:41 PM: Installing Go version 1.12 8:11:46 PM: unset GOOS; 8:11:46 PM: unset GOARCH; 8:11:46 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64'; 8:11:46 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}"; 8:11:46 PM: go version >&2; 8:11:46 PM: export GIMME_ENV="/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env" 8:11:46 PM: go version go1.12 linux/amd64 8:11:46 PM: Installing missing commands 8:11:46 PM: Verify run directory 8:11:48 PM: ​ 8:11:48 PM: ──────────────────────────────────────────────────────────────── 8:11:48 PM: Netlify Build 8:11:48 PM: ──────────────────────────────────────────────────────────────── 8:11:48 PM: ​ 8:11:48 PM: ❯ Version 8:11:48 PM: @netlify/build 11.5.1 8:11:48 PM: ​ 8:11:48 PM: ❯ Flags 8:11:48 PM: deployId: 608f3f70eb46310008fd359e 8:11:48 PM: ​ 8:11:48 PM: ❯ Current directory 8:11:48 PM: /opt/build/repo 8:11:48 PM: ​ 8:11:48 PM: ❯ Config file 8:11:48 PM: /opt/build/repo/netlify.toml 8:11:48 PM: ​ 8:11:48 PM: ❯ Context 8:11:48 PM: deploy-preview 8:11:48 PM: ​ 8:11:48 PM: ❯ Loading plugins 8:11:48 PM: - @netlify/plugin-nextjs@3.1.0 from netlify.toml and package.json 8:11:48 PM: ​ 8:11:48 PM: ──────────────────────────────────────────────────────────────── 8:11:48 PM: 1. onPreBuild command from @netlify/plugin-nextjs 8:11:48 PM: ──────────────────────────────────────────────────────────────── 8:11:48 PM: ​ 8:11:49 PM: info - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5 8:11:50 PM: ​ 8:11:50 PM: (@netlify/plugin-nextjs onPreBuild completed in 1.2s) 8:11:50 PM: ​ 8:11:50 PM: ──────────────────────────────────────────────────────────────── 8:11:50 PM: 2. build.command from netlify.toml 8:11:50 PM: ──────────────────────────────────────────────────────────────── 8:11:50 PM: ​ 8:11:50 PM: $ npm run build 8:11:50 PM: > futurity-website@2.2.0-beta.1 build /opt/build/repo 8:11:50 PM: > next build 8:11:51 PM: info - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5 8:11:52 PM: warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache 8:11:52 PM: info - Checking validity of types... 8:11:52 PM: info - Creating an optimized production build... 8:23:19 PM: warn - Compiled with warnings 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/configuration.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/lib/node/dependencies.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/browserslist/node.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/browserslist/node.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/lib/node/dependencies.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/configuration.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/configuration.js 8:23:19 PM: Critical dependency: require function is used in a way in which dependencies cannot be statically extracted 8:23:19 PM: ./node_modules/next/dist/next-server/server/load-components.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/module-types.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@babel/helper-define-polyfill-provider/node_modules/@babel/core/lib/config/files/import.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/browserslist/node.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/next/dist/next-server/server/require.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/browserslist/node.js 181:16-186:5 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/next/dist/next-server/server/require.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@mdx-js/mdx/node_modules/@babel/core/lib/config/files/module-types.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/module-types.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@babel/helper-create-regexp-features-plugin/node_modules/@babel/core/lib/config/files/import.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@mdx-js/mdx/node_modules/@babel/core/lib/config/files/import.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/next/dist/next-server/server/require.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/next/dist/next-server/server/load-components.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/next/dist/next-server/server/load-components.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@mdx-js/mdx/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/module-types.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/@babel/core/lib/config/files/import.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/remark-mdx/node_modules/@babel/core/lib/config/files/plugins.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/remark-mdx/node_modules/@babel/core/lib/config/files/module-types.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: ./node_modules/remark-mdx/node_modules/@babel/core/lib/config/files/import.js 8:23:19 PM: Critical dependency: the request of a dependency is an expression 8:23:19 PM: info - Collecting page data... 8:23:23 PM: info - Generating static pages (0/15) 8:23:26 PM: info - Generating static pages (3/15) 8:23:30 PM: info - Generating static pages (7/15) 8:23:31 PM: info - Generating static pages (11/15) 8:23:32 PM: info - Generating static pages (15/15) 8:23:32 PM: info - Finalizing page optimization... 8:23:32 PM: Page Size First Load JS 8:23:32 PM: ┌ ○ / 5.34 kB 265 kB 8:23:32 PM: ├ /_app 0 B 260 kB 8:23:32 PM: ├ ○ /404 3.3 kB 263 kB 8:23:32 PM: ├ ○ /about 15.4 kB 275 kB 8:23:32 PM: ├ λ /deliverable 1.4 kB 261 kB 8:23:32 PM: ├ λ /event 3.88 kB 264 kB 8:23:32 PM: ├ ● /ideas (ISR: 1 Seconds) 2.19 kB 262 kB 8:23:32 PM: ├ ● /lab/[lab] 2.15 kB 262 kB 8:23:32 PM: ├ ├ /lab/acommerce 8:23:32 PM: ├ ├ /lab/foodturity 8:23:32 PM: ├ └ /lab/neuiro 8:23:32 PM: ├ ● /lab/[lab]/[offering] 2.28 kB 262 kB 8:23:32 PM: ├ └ /lab/acommerce/TheAgeofAutonomousCommerce 8:23:32 PM: ├ ○ /labs 2.32 kB 262 kB 8:23:32 PM: ├ ○ /privacy 307 B 260 kB 8:23:32 PM: ├ ○ /services 5.26 kB 265 kB 8:23:32 PM: └ ○ /synthesizingfutures 112 kB 372 kB 8:23:32 PM: + First Load JS shared by all 260 kB 8:23:32 PM: ├ chunks/commons.bd292d.js 13.4 kB 8:23:32 PM: ├ chunks/de711bc64e5dd0cc01033de4ed2364dc30cd773b.f87592.js 184 kB 8:23:32 PM: ├ chunks/de711bc64e5dd0cc01033de4ed2364dc30cd773b_CSS.0a0b70.js 68 B 8:23:32 PM: ├ chunks/framework.3105c3.js 42.3 kB 8:23:32 PM: ├ chunks/main.0e3d3f.js 7.19 kB 8:23:32 PM: ├ chunks/pages/_app.00f1ca.js 11.3 kB 8:23:32 PM: ├ chunks/webpack.fdaa27.js 1.19 kB 8:23:32 PM: ├ css/7a633b4a3b0c9f592628.css 4.76 kB 8:23:32 PM: └ css/e5176deec75421797f33.css 3.29 kB 8:23:32 PM: λ (Lambda) server-side renders at runtime (uses getInitialProps or getServerSideProps) 8:23:32 PM: ○ (Static) automatically rendered as static HTML (uses no initial props) 8:23:32 PM: ● (SSG) automatically generated as static HTML + JSON (uses getStaticProps) 8:23:32 PM: (ISR) incremental static regeneration (uses revalidate in getStaticProps) 8:23:32 PM: ​ 8:23:32 PM: (build.command completed in 11m 42.6s) 8:23:32 PM: ​ 8:23:32 PM: ──────────────────────────────────────────────────────────────── 8:23:32 PM: 3. onBuild command from @netlify/plugin-nextjs 8:23:32 PM: ──────────────────────────────────────────────────────────────── 8:23:32 PM: ​ 8:23:32 PM: ** Running Next on Netlify package ** 8:23:32 PM: 🚀 Next on Netlify 🚀 8:23:32 PM: 🌍️ Copying public/ folder to out 8:23:33 PM: info - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5 8:23:33 PM: 💼 Copying static NextJS assets to out 8:23:33 PM: 💫 Setting up API endpoints as Netlify Functions in netlify/functions 8:23:33 PM: 💫 Setting up pages with getInitialProps as Netlify Functions in netlify/functions 8:23:33 PM: 💫 Setting up pages with getServerSideProps as Netlify Functions in netlify/functions 8:23:33 PM: 🔥 Copying pre-rendered pages with getStaticProps and JSON data to out 8:23:33 PM: 💫 Setting up pages with getStaticProps and fallback: true as Netlify Functions in netlify/functions 8:23:33 PM: 💫 Setting up pages with getStaticProps and revalidation interval as Netlify Functions in netlify/functions 8:23:33 PM: 🔥 Copying pre-rendered pages without props to out 8:23:33 PM: 🔀 Setting up redirects 8:23:33 PM: 🔀 Setting up headers 8:23:33 PM: ✅ Success! All done! 8:23:33 PM: ​ 8:23:33 PM: (@netlify/plugin-nextjs onBuild completed in 797ms) 8:23:33 PM: ​ 8:23:33 PM: ──────────────────────────────────────────────────────────────── 8:23:33 PM: 4. Functions bundling 8:23:33 PM: ──────────────────────────────────────────────────────────────── 8:23:33 PM: ​ 8:23:33 PM: Packaging Functions from netlify/functions directory: 8:23:33 PM: - next_image.js 8:23:33 PM: - next_deliverable/next_deliverable.js 8:23:33 PM: - next_event/next_event.js 8:23:33 PM: - next_ideas/next_ideas.js 8:23:33 PM: - next_lab_lab/next_lab_lab.js 8:23:33 PM: - next_lab_lab_offering/next_lab_lab_offering.js 8:23:33 PM: ​ 8:24:58 PM: ​ 8:24:58 PM: ──────────────────────────────────────────────────────────────── 8:24:58 PM: Dependencies installation error 8:24:58 PM: ──────────────────────────────────────────────────────────────── 8:24:58 PM: ​ 8:24:58 PM: Error message 8:24:58 PM: A Netlify Function failed to require one of its dependencies. 8:24:58 PM: Please make sure it is present in the site's top-level "package.json".​ 8:24:58 PM: In file "/opt/build/repo/netlify/functions/next_deliverable/next_deliverable.js" 8:24:58 PM: Cannot find module '_process' 8:24:58 PM: Require stack: 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/resolve.js 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/node_dependencies/index.js 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/node_modules/@netlify/zip-it-and-ship-it/src/main.js 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/plugins_core/functions/index.js 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/commands/get.js 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/main.js 8:24:58 PM: - /opt/buildhome/.netlify-build-nvm/versions/node/v12.16.3/lib/node_modules/@netlify/build/src/core/bin.js 8:24:58 PM: ​ 8:24:58 PM: Resolved config 8:24:58 PM: build: 8:24:58 PM: command: npm run build 8:24:58 PM: commandOrigin: config 8:24:58 PM: environment: 8:24:58 PM: - GOOGLE_SHEETS_CLIENT_EMAIL 8:24:58 PM: - GOOGLE_SHEETS_PRIVATE_KEY 8:24:58 PM: - REVIEW_ID 8:24:58 PM: - SPREADSHEET_ID 8:24:58 PM: publish: /opt/build/repo/out 8:24:58 PM: plugins: 8:24:58 PM: - inputs: {} 8:24:58 PM: origin: config 8:24:58 PM: package: '@netlify/plugin-nextjs' 8:25:10 PM: Caching artifacts 8:25:10 PM: Started saving node modules 8:25:10 PM: Finished saving node modules 8:25:10 PM: Started saving build plugins 8:25:10 PM: Finished saving build plugins 8:25:10 PM: Started saving yarn cache 8:25:10 PM: Finished saving yarn cache 8:25:10 PM: Started saving pip cache 8:25:10 PM: Finished saving pip cache 8:25:10 PM: Started saving emacs cask dependencies 8:25:10 PM: Finished saving emacs cask dependencies 8:25:10 PM: Started saving maven dependencies 8:25:10 PM: Finished saving maven dependencies 8:25:10 PM: Started saving boot dependencies 8:25:10 PM: Finished saving boot dependencies 8:25:10 PM: Started saving rust rustup cache 8:25:10 PM: Finished saving rust rustup cache 8:25:10 PM: Started saving go dependencies 8:25:11 PM: Finished saving go dependencies 8:25:15 PM: Build failed due to a user error: Build script returned non-zero exit code: 2 8:25:15 PM: Creating deploy upload records 8:25:15 PM: Failing build: Failed to build site 8:25:15 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 8:25:15 PM: Finished processing build request in 14m48.817509211s

{ "name": "futurity-website", "version": "2.2.0-beta.1", "license": "ISC", "scripts": { "dev": "next", "build": "next build", "start": "next start", "export": "next export", "deploy": "npm run build && next export", "bump": "$(npm bin)/bump --tag --commit" }, "dependencies": { "framer-motion": "^4.1.11", "googleapis": "^73.0.0", "image-trace-loader": "^1.0.2", "imagemin-gifsicle": "^7.0.0", "imagemin-mozjpeg": "^9.0.0", "imagemin-optipng": "^8.0.0", "imagemin-svgo": "^9.0.0", "jimp": "^0.16.1", "lottie": "^0.0.1", "lottie-react": "^2.1.0", "lqip-loader": "^2.2.0", "netlify-cli": "^3.24.3", "next": "^10.1.3", "next-compose-plugins": "^2.2.0", "next-mdx-remote": "^2.1.4", "next-optimized-images": "^2.6.1", "next-pwa": "^5.2.21", "nextjs-sitemap-generator": "^1.0.0", "node-sass": "^5.0.0", "parallax-js": "^3.1.0", "react": "^17.0.2", "react-device-detect": "^1.13.1", "react-dom": "^17.0.2", "react-icalendar-link": "^2.0.0", "react-intersection-observer": "^8.26.2", "react-normalize": "^0.4.4", "react-scrolllock": "^5.0.1", "react-use": "^17.2.4", "responsive-loader": "^2.3.0", "svg-sprite-loader": "^6.0.6", "typed.js": "^2.0.11", "version-bump-prompt": "^6.0.3", "webp-loader": "^0.6.0" }, "devDependencies": { "@netlify/plugin-nextjs": "3.1.0", "frontmatter-markdown-loader": "^3.6.2" } }

Hey there, @Lucaslpena :wave: Thanks for much for participating in the Netlify Forums.

It looks like you have two posts addressing the same topic open right now. In order to streamline communication, I am going to close this thread and leave your other dependencies installation error thread open.

1 Like