How to deal with error "Deploy failed due to an error in @netlify/plugin-deploy-core plugin."?
Asked Answered
F

0

3

I have trouble with deploying the Next.js project to Netlify. It was working well yesterday but now I am getting errors while deployment.

Here I attached error log screenshot and full log. enter image description here

11:40:08 AM: Build ready to start
11:40:10 AM: build-image version: d84c79427e8f83c1ba17bcdd7b3fe38059376b68
11:40:10 AM: build-image tag: v3.6.1
11:40:10 AM: buildbot version: 734b021f1afb208e332629f2580fef69fda9a3bc
11:40:10 AM: Fetching cached dependencies
11:40:10 AM: Starting to download cache of 174.6MB
11:40:13 AM: Finished downloading cache in 2.583128304s
11:40:13 AM: Starting to extract cache
11:40:19 AM: Finished extracting cache in 5.856158207s
11:40:19 AM: Finished fetching cache in 8.536637583s
11:40:19 AM: Starting to prepare the repo for build
11:40:19 AM: Preparing Git Reference refs/heads/master
11:40:21 AM: Starting build script
11:40:22 AM: Installing dependencies
11:40:22 AM: Python version set to 2.7
11:40:22 AM: Started restoring cached node version
11:40:26 AM: Finished restoring cached node version
11:40:26 AM: Attempting node version 'lts/*' from .nvmrc
11:40:26 AM: v14.15.4 is already installed.
11:40:27 AM: Now using node v14.15.4 (npm v6.14.10)
11:40:27 AM: Started restoring cached build plugins
11:40:27 AM: Finished restoring cached build plugins
11:40:27 AM: Attempting ruby version 2.7.1, read from environment
11:40:29 AM: Using ruby version 2.7.1
11:40:29 AM: Using PHP version 5.6
11:40:29 AM: Started restoring cached node modules
11:40:29 AM: Finished restoring cached node modules
11:40:29 AM: Installing NPM modules using NPM version 6.14.10
11:40:37 AM: > @fortawesome/[email protected] postinstall /opt/build/repo/node_modules/@fortawesome/fontawesome-free
11:40:37 AM: > node attribution.js
11:40:37 AM: Font Awesome Free 5.15.2 by @fontawesome - https://fontawesome.com
11:40:37 AM: License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
11:40:38 AM: npm WARN [email protected] No repository field.
11:40:38 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
11:40:38 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
11:40:38 AM: npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
11:40:38 AM: npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
11:40:38 AM: added 2 packages from 8 contributors and audited 841 packages in 7.665s
11:40:38 AM: 46 packages are looking for funding
11:40:38 AM:   run `npm fund` for details
11:40:38 AM: found 0 vulnerabilities
11:40:38 AM: NPM modules installed
11:40:39 AM: Started restoring cached go cache
11:40:39 AM: Finished restoring cached go cache
11:40:39 AM: go version go1.14.4 linux/amd64
11:40:39 AM: go version go1.14.4 linux/amd64
11:40:39 AM: Installing missing commands
11:40:39 AM: Verify run directory
11:40:41 AM: ​
11:40:41 AM: ────────────────────────────────────────────────────────────────
11:40:41 AM:   Netlify Build                                                 
11:40:41 AM: ────────────────────────────────────────────────────────────────
11:40:41 AM: ​
11:40:41 AM: ❯ Version
11:40:41 AM:   @netlify/build 8.1.0
11:40:41 AM: ​
11:40:41 AM: ❯ Flags
11:40:41 AM:   deployId: 600b0df846a4a100075e9970
11:40:41 AM:   mode: buildbot
11:40:41 AM: ​
11:40:41 AM: ❯ Current directory
11:40:41 AM:   /opt/build/repo
11:40:41 AM: ​
11:40:41 AM: ❯ Config file
11:40:41 AM:   No config file was defined: using default values.
11:40:41 AM: ​
11:40:41 AM: ❯ Context
11:40:41 AM:   production
11:40:42 AM: ​
11:40:42 AM: ────────────────────────────────────────────────────────────────
11:40:42 AM:   1. Build command from Netlify app                             
11:40:42 AM: ────────────────────────────────────────────────────────────────
11:40:42 AM: ​
11:40:42 AM: $ npm run build
11:40:42 AM: > [email protected] build /opt/build/repo
11:40:42 AM: > next build
11:40:43 AM: warn  - No build cache found. Please configure build caching for faster rebuilds. Read more: https://err.sh/next.js/no-cache
11:40:43 AM: info  - Creating an optimized production build...
11:41:07 AM: info  - Compiled successfully
11:41:07 AM: info  - Collecting page data...
11:41:07 AM: info  - Generating static pages (0/4)
11:41:08 AM: info  - Generating static pages (1/4)
11:41:08 AM: info  - Generating static pages (2/4)
11:41:08 AM: info  - Generating static pages (3/4)
11:41:08 AM: info  - Generating static pages (4/4)
11:41:08 AM: info  - Finalizing page optimization...
11:41:08 AM: Page                                                           Size     First Load JS
11:41:08 AM: ┌ ○ /                                                          3.62 kB        75.3 kB
11:41:08 AM: ├   /_app                                                      0 B            71.7 kB
11:41:08 AM: ├ ○ /404                                                       3.44 kB        75.1 kB
11:41:08 AM: ├ ○ /about/members                                             3.46 kB        75.1 kB
11:41:08 AM: └ ○ /good                                                      291 B            72 kB
11:41:08 AM: + First Load JS shared by all                                  71.7 kB
11:41:08 AM:   ├ chunks/1bfc9850.a98e9d.js                                  1.5 kB
11:41:08 AM:   ├ chunks/3ef630e34cd10ba68f9d468ac363ff81c534e1e9.1f52a3.js  12.8 kB
11:41:08 AM:   ├ chunks/framework.7e70a0.js                                 41.8 kB
11:41:08 AM:   ├ chunks/main.265550.js                                      6.55 kB
11:41:08 AM:   ├ chunks/pages/_app.7ea720.js                                8.35 kB
11:41:08 AM:   ├ chunks/webpack.95c2b2.js                                   751 B
11:41:08 AM:   └ css/dcb191e7b4467a4654ac.css                               2.98 kB
11:41:08 AM: λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
11:41:08 AM: ○  (Static)  automatically rendered as static HTML (uses no initial props)
11:41:08 AM: ●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
11:41:08 AM:    (ISR)     incremental static regeneration (uses revalidate in getStaticProps)
11:41:08 AM: ​
11:41:08 AM: (build.command completed in 26.6s)
11:41:08 AM: ​
11:41:08 AM: ────────────────────────────────────────────────────────────────
11:41:08 AM:   2. onPostBuild command from @netlify/plugin-deploy-core       
11:41:08 AM: ────────────────────────────────────────────────────────────────
11:41:08 AM: ​
11:41:08 AM: Starting to deploy site from ''
11:41:09 AM: ​
11:41:09 AM: ────────────────────────────────────────────────────────────────
11:41:09 AM:   Plugin "@netlify/plugin-deploy-core" failed                   
11:41:09 AM: ────────────────────────────────────────────────────────────────
11:41:09 AM: ​
11:41:09 AM:   Error message
11:41:09 AM:   Error: Deploy did not succeed: Invalid filename 'node_modules/es5-ext/test/array/#/find-index/implement.js'. Deployed filenames cannot contain # or ? characters
11:41:09 AM: ​
11:41:09 AM:   Plugin details
11:41:09 AM:   Package:        @netlify/plugin-deploy-core
11:41:09 AM:   Version:        8.1.0
11:41:09 AM:   Repository:     git+https://github.com/netlify/build.git
11:41:09 AM:   npm link:       https://www.npmjs.com/package/@netlify/build
11:41:09 AM:   Report issues:  https://github.com/netlify/build/issues
11:41:09 AM: ​
11:41:09 AM:   Error location
11:41:09 AM:   In "onPostBuild" event in "@netlify/plugin-deploy-core" from core
11:41:09 AM: ​
11:41:09 AM:   Resolved config
11:41:09 AM:   build:
11:41:09 AM:     command: npm run build
11:41:09 AM:     commandOrigin: ui
11:41:10 AM: Caching artifacts
11:41:10 AM: Started saving node modules
11:41:10 AM: Finished saving node modules
11:41:10 AM: Started saving build plugins
11:41:10 AM: Finished saving build plugins
11:41:10 AM: Started saving pip cache
11:41:10 AM: Finished saving pip cache
11:41:10 AM: Started saving emacs cask dependencies
11:41:10 AM: Finished saving emacs cask dependencies
11:41:10 AM: Started saving maven dependencies
11:41:10 AM: Finished saving maven dependencies
11:41:10 AM: Started saving boot dependencies
11:41:10 AM: Finished saving boot dependencies
11:41:10 AM: Started saving rust rustup cache
11:41:10 AM: Finished saving rust rustup cache
11:41:10 AM: Started saving go dependencies
11:41:10 AM: Finished saving go dependencies
11:41:10 AM: Build failed due to a user error: Build script returned non-zero exit code: 2
11:41:10 AM: Failing build: Failed to build site
11:41:10 AM: Failed during stage 'building site': Build script returned non-zero exit code: 2
11:41:10 AM: Finished processing build request in 59.874284145s

From the error log, I guess the error should come from es5-ext module. enter image description here

Here is my package.jon file content.

{
  "name": "next-starter-tailwind",
  "version": "2.0.0",
  "description": "Next.js starter styled with Tailwind CSS",
  "main": "index.js",
  "scripts": {
    "dev": "next",
    "build": "next build",
    "start": "next start"
  },
  "author": "Taylor Bryant",
  "license": "MIT",
  "dependencies": {
    "@fortawesome/fontawesome-free": "^5.15.2",
    "next": "10.0.4",
    "react": "17.0.1",
    "react-dom": "17.0.1",
    "react-icons": "^4.1.0"
  },
  "devDependencies": {
    "autoprefixer": "10.1.0",
    "classnames": "2.2.6",
    "postcss": "8.2.1",
    "postcss-100vh-fix": "1.0.2",
    "postcss-flexbugs-fixes": "5.0.2",
    "postcss-hover-media-feature": "1.0.0",
    "postcss-preset-env": "6.7.0",
    "tailwindcss": "2.0.2"
  }
}

How can I resolve this?

Friday answered 24/1, 2021 at 17:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.