Object.entries(...).flatMap is not a function

The last time my deploy worked was on May 10th and here’s the deploy link working:

Last working deploy

Since then I have always been getting the same error, any idea what it could be or what I can do?

I’m doing the build from Github

This is the deploy log I’m receving:

7:39:30 PM: Build ready to start
7:39:32 PM: build-image version: 0582042f4fc261adc7bd8333f34884959c577302
7:39:32 PM: build-image tag: v3.7.6
7:39:32 PM: buildbot version: 0e23307adb9080898b837c5147a17e2f7890cb10
7:39:32 PM: Fetching cached dependencies
7:39:32 PM: Starting to download cache of 245.4MB
7:39:35 PM: Finished downloading cache in 2.648557096s
7:39:35 PM: Starting to extract cache
7:39:43 PM: Finished extracting cache in 8.713491708s
7:39:43 PM: Finished fetching cache in 11.44981995s
7:39:43 PM: Starting to prepare the repo for build
7:39:44 PM: Preparing Git Reference refs/heads/master
7:39:45 PM: Parsing package.json dependencies
7:39:45 PM: Starting build script
7:39:45 PM: Installing dependencies
7:39:45 PM: Python version set to 2.7
7:39:46 PM: Started restoring cached node version
7:39:49 PM: Finished restoring cached node version
7:39:50 PM: v10.24.1 is already installed.
7:39:50 PM: Now using node v10.24.1 (npm v6.14.12)
7:39:51 PM: Started restoring cached build plugins
7:39:51 PM: Finished restoring cached build plugins
7:39:51 PM: Attempting ruby version 2.6.2, read from environment
7:39:52 PM: Using ruby version 2.6.2
7:39:52 PM: Using PHP version 5.6
7:39:52 PM: Started restoring cached node modules
7:39:52 PM: Finished restoring cached node modules
7:39:53 PM: Installing NPM modules using NPM version 6.14.12
7:40:15 PM: > core-js@3.13.1 postinstall /opt/build/repo/node_modules/core-js
7:40:15 PM: > node -e "try{require('./postinstall')}catch(e){}"
7:40:17 PM: npm WARN notsup Unsupported engine for @tailwindcss/postcss7-compat@2.1.3: wanted: {"node":">=12.13.0"} (current: {"node":"10.24.1","npm":"6.14.12"})
7:40:17 PM: npm WARN notsup Not compatible with your version of node/npm: @tailwindcss/postcss7-compat@2.1.3
7:40:17 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/webpack-dev-server/node_modules/fsevents):
7:40:17 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
7:40:17 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/watchpack-chokidar2/node_modules/fsevents):
7:40:17 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
7:40:17 PM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules/fsevents):
7:40:17 PM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
7:40:17 PM: added 322 packages from 178 contributors, removed 111 packages, updated 332 packages and moved 1 package in 22.904s
7:40:18 PM: 81 packages are looking for funding
7:40:18 PM:   run `npm fund` for details
7:40:18 PM: NPM modules installed
7:40:18 PM: Started restoring cached go cache
7:40:20 PM: Finished restoring cached go cache
7:40:20 PM: Installing Go version 1.12
7:40:20 PM: unset GOOS;
7:40:20 PM: unset GOARCH;
7:40:20 PM: export GOROOT='/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64';
7:40:20 PM: export PATH="/opt/buildhome/.gimme_cache/versions/go1.12.linux.amd64/bin:${PATH}";
7:40:20 PM: go version >&2;
7:40:20 PM: export GIMME_ENV='/opt/buildhome/.gimme_cache/env/go1.12.linux.amd64.env';
7:40:20 PM: go version go1.12 linux/amd64
7:40:20 PM: Installing missing commands
7:40:20 PM: Verify run directory
7:40:20 PM: ​
7:40:20 PM: ────────────────────────────────────────────────────────────────
7:40:20 PM:   Netlify Build                                                 
7:40:20 PM: ────────────────────────────────────────────────────────────────
7:40:20 PM: ​
7:40:20 PM: ❯ Version
7:40:20 PM:   @netlify/build 11.29.2
7:40:20 PM: ​
7:40:20 PM: ❯ Flags
7:40:20 PM:   deployId: 60b6b722e5506b00083d67a7
7:40:20 PM: ​
7:40:20 PM: ❯ Current directory
7:40:20 PM:   /opt/build/repo
7:40:20 PM: ​
7:40:20 PM: ❯ Config file
7:40:20 PM:   No config file was defined: using default values.
7:40:20 PM: ​
7:40:20 PM: ❯ Context
7:40:20 PM:   production
7:40:20 PM: ​
7:40:20 PM: ────────────────────────────────────────────────────────────────
7:40:20 PM:   1. Build command from Netlify app                             
7:40:20 PM: ────────────────────────────────────────────────────────────────
7:40:20 PM: ​
7:40:20 PM: $ npm run build
7:40:21 PM: > vue-portfolio@0.1.0 build /opt/build/repo
7:40:21 PM: > vue-cli-service build
7:40:22 PM: -  Building for production...
7:40:31 PM:  ERROR  Failed to compile with 2 errors10:40:31 PM
7:40:31 PM:  error  in ./node_modules/tailwindcss/tailwind.css
7:40:31 PM: TypeError: Object.entries(...).flatMap is not a function
7:40:31 PM:     at Array.forEach (<anonymous>)
7:40:31 PM:     at new Promise (<anonymous>)
7:40:31 PM:  @ ./src/main.js 7:0-34
7:40:31 PM:  @ multi ./src/main.js
7:40:31 PM:  error  in ./src/App.vue?vue&type=style&index=0&lang=css&
7:40:31 PM: TypeError: getProcessedPlugins is not a function
7:40:31 PM:     at new Promise (<anonymous>)
7:40:31 PM:  @ ./src/App.vue?vue&type=style&index=0&lang=css& 1:0-421 1:0-421
7:40:31 PM:  @ ./src/App.vue
7:40:31 PM:  @ ./src/main.js
7:40:31 PM:  @ multi ./src/main.js
7:40:31 PM:  ERROR  Build failed with errors.
7:40:31 PM: npm ERR! code ELIFECYCLE
7:40:31 PM: npm ERR! errno 1
7:40:31 PM: npm ERR! vue-portfolio@0.1.0 build: `vue-cli-service build`
7:40:31 PM: npm ERR! Exit status 1
7:40:31 PM: npm ERR!
7:40:31 PM: npm ERR! Failed at the vue-portfolio@0.1.0 build script.
7:40:31 PM: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
7:40:31 PM: npm ERR! A complete log of this run can be found in:
7:40:31 PM: npm ERR!     /opt/buildhome/.npm/_logs/2021-06-01T22_40_31_684Z-debug.log
7:40:31 PM: ​
7:40:31 PM: ────────────────────────────────────────────────────────────────
7:40:31 PM:   "build.command" failed                                        
7:40:31 PM: ────────────────────────────────────────────────────────────────
7:40:31 PM: ​
7:40:31 PM:   Error message
7:40:31 PM:   Command failed with exit code 1: npm run build
7:40:31 PM: ​
7:40:31 PM:   Error location
7:40:31 PM:   In Build command from Netlify app:
7:40:31 PM:   npm run build
7:40:31 PM: ​
7:40:31 PM:   Resolved config
7:40:31 PM:   build:
7:40:31 PM:     command: npm run build
7:40:31 PM:     commandOrigin: ui
7:40:31 PM:     publish: /opt/build/repo/dist
7:40:31 PM:   functions:
7:40:31 PM:     '*': {}
7:40:32 PM: Caching artifacts
7:40:32 PM: Started saving node modules
7:40:32 PM: Finished saving node modules
7:40:32 PM: Started saving build plugins
7:40:32 PM: Finished saving build plugins
7:40:32 PM: Started saving pip cache
7:40:32 PM: Finished saving pip cache
7:40:32 PM: Started saving emacs cask dependencies
7:40:32 PM: Finished saving emacs cask dependencies
7:40:32 PM: Started saving maven dependencies
7:40:32 PM: Finished saving maven dependencies
7:40:32 PM: Started saving boot dependencies
7:40:32 PM: Finished saving boot dependencies
7:40:32 PM: Started saving rust rustup cache
7:40:32 PM: Finished saving rust rustup cache
7:40:32 PM: Started saving go dependencies
7:40:34 PM: Finished saving go dependencies
7:40:34 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
7:40:34 PM: Creating deploy upload records
7:40:34 PM: Failing build: Failed to build site
7:40:34 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2
7:40:34 PM: Finished processing build request in 1m2.178661582s

Here’s also the link from this deploy log above

Thank you very much in advance.

To whoever had the same problem as me.

This issue solved for me: Tailwind - Netlify build fail

1 Like