next-runtime icon indicating copy to clipboard operation
next-runtime copied to clipboard

Build issue onPostBuild event after upgraded to latest plugin

Open nikhil-toobler opened this issue 2 years ago • 17 comments

Summary

Hey,

I'm facing a build error when upgrading to a new plugin on both local and production. Here's the build logs

[
  ... 441 more items
].

(@netlify/plugin-nextjs onBuild completed in 1.2s)
​
────────────────────────────────────────────────────────────────
  4. Functions bundling                                         
────────────────────────────────────────────────────────────────
​
Packaging Functions from .netlify/functions-internal directory:
 - ___netlify-handler/___netlify-handler.js
 - ___netlify-odb-handler/___netlify-odb-handler.js
 - _ipx/_ipx.js
​
Packaging Functions from my_functions directory:
 - BannerForm.js
 - ContactForm.js
​
​
(Functions bundling completed in 52.2s)
​
────────────────────────────────────────────────────────────────
  5. @netlify/plugin-nextjs (onPostBuild event)                 
────────────────────────────────────────────────────────────────
​
Next.js cache saved.
The function zip .netlify/functions/___netlify-odb-handler.zip size is 70.6 MB, which is larger than the maximum supported size of 52.4 MB.
There are a few reasons this could happen. You may have accidentally bundled a large dependency, or you might have a
large number of pre-rendered pages included.
Contains 2602 files


These are the largest files in the zip:
┌─────────┬────────────────────────────────────────────────────────────────────────────────┬─────────────────┬───────────────────┐
│ (index) │                                      File                                      │ Compressed Size │ Uncompressed Size │
├─────────┼────────────────────────────────────────────────────────────────────────────────┼─────────────────┼───────────────────┤
│    1    │          'node_modules/sharp/vendor/8.10.6/lib/libvips-cpp.42.dylib'           │    '9.72 MB'    │     '22.8 MB'     │
│    2    │             'node_modules/react-dom/cjs/react-dom.development.js'              │    '249 kB'     │     '895 kB'      │
│    3    │       '.next/server/pages/services/mobile-application-development.html'        │    '174 kB'     │     '674 kB'      │
│    4    │        '.next/server/pages/services/react-native-app-development.html'         │    '175 kB'     │     '672 kB'      │
│    5    │     '.next/server/pages/services/mobile-application-development-faq.html'      │    '175 kB'     │     '672 kB'      │
│    6    │    '.next/server/pages/services/cloud-native-application-development.html'     │    '171 kB'     │     '658 kB'      │
│    7    │           '.next/server/pages/services/kubernetes-engineering.html'            │    '173 kB'     │     '654 kB'      │
│    8    │ '.next/server/pages/services/custom-web-application-development-services.html' │    '175 kB'     │     '651 kB'      │
│    9    │        '.next/server/pages/services/devops-source-code-management.html'        │    '170 kB'     │     '649 kB'      │
│   10    │          '.next/server/pages/services/application-modernization.html'          │    '171 kB'     │     '649 kB'      │
└─────────┴────────────────────────────────────────────────────────────────────────────────┴─────────────────┴───────────────────┘


For more information on fixing this, see https://ntl.fyi/large-next-functions
​
(@netlify/plugin-nextjs onPostBuild completed in 4.1s)
​
────────────────────────────────────────────────────────────────
  Netlify Build Complete                                        
────────────────────────────────────────────────────────────────

netlify.toml

[build]
  command = "npm run build"
  publish = ".next"

[[plugins]]
  package = "@netlify/plugin-nextjs"

[[redirects]]
  from = "/*"
  to = "/404"
  status = 404

[context.production.environment]
NEXT_SERVERLESS = "true"
NODE_ENV = "production"

[functions]
  directory = "my_functions"
  included_files = ["!node_modules/sharp/vendor/**/*"]

Package.json

{ 
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start", 
  },
  "dependencies": { 
    "next": "^12.0.7", 
    "react": "17.0.2", 
  },
  "devDependencies": {
    "@netlify/plugin-nextjs": "^4.1.1", 
  }
}

next.config.js

module.exports = { 
  eslint: { 
    ignoreDuringBuilds: true,
  }
};

.env

REACT_APP_STORYBLOK_REVALIDATE = true

services/[slug].js

import Layout from "../../components/Layout";
import { getHeader, getFooter, getAllServiceWithSlug, getService, getServicePagecount, getBlogList, getTestimonials, getCasestudyList } from "../../lib/api"; 
import ServiceDetails from "../../components/Services/Details";


export async function getStaticProps({ params, preview = null }) {
    const serviceData = await getService(params.slug, preview); 
    
    let notfound = false;
    if (!serviceData.service) {
        notfound = true;
    }
    const header = (await getHeader(preview)) || []
    const footer = (await getFooter(preview)) || []
    const blogListData = await getBlogList() || [];
    const testimonials = await getTestimonials() || [];
    const casestudyList = (await getCasestudyList()) || [] 
    return {
        props: { header, footer, serviceData, blogListData, testimonials, casestudyList },
        revalidate: process.env.REACT_APP_STORYBLOK_REVALIDATE === "false" ? false : 1,
        notFound: notfound
    }
}

export async function getStaticPaths() { 
    const allServices = await getPaginateddata();
    return {
        paths: allServices?.map((blog) => `/${blog.full_slug}`) || [],
        fallback: process.env.REACT_APP_STORYBLOK_REVALIDATE === "false" ? false : 'blocking',
    }
}


async function getPaginateddata() {
    const output = [];
    const pagesize = 100;
    const allPosts = await getServicePagecount();
    const totalpages = Math.ceil(allPosts.total / pagesize);
    for (let i = 1; i <= totalpages; i++) {
      const data = await getAllServiceWithSlug(i, pagesize);
      output.push(...data);
    }
    return output;
}

export default function Blog({ header, serviceData, footer, blogListData, testimonials, casestudyList }) { 
    const headerContent = header[0].content;
    const footerContent = footer[0].content;  
    const serviceDataList = serviceData.service.content;
    const testimonialsData = testimonials[0].content.body;
    const casestudiesData = casestudyList; 
    return (
        <Layout headerContent={headerContent} footerContent={footerContent} metaValues={serviceDataList.seo}> 
            <ServiceDetails 
                content={serviceDataList} 
                blogListData={blogListData} 
                testimonialsData={testimonialsData}
                casestudiesData={casestudiesData}
            />
        </Layout>
    )
}

Steps to reproduce

when build run

A link to a reproduction repository

No response

Plugin version

4.0.0

More information about your build

  • [X] I am building using the CLI
  • [x] I am building using file-based configuration (netlify.toml)

What OS are you using?

Mac OS

Your netlify.toml file

[build]
  command = "npm run build"
  publish = ".next"

[[plugins]]
  package = "@netlify/plugin-nextjs"

[[redirects]]
  from = "/*"
  to = "/404"
  status = 404

[context.production.environment]
NEXT_SERVERLESS = "true"
NODE_ENV = "production"

[functions]
  directory = "my_functions"
  included_files = ["!node_modules/sharp/vendor/**/*"]

Your public/_redirects file

`_redirects`
# Paste content of your `_redirects` file here

Your next.config.js file

module.exports = { 
  eslint: { 
    ignoreDuringBuilds: true,
  }
};

Builds logs (or link to your logs)

Build logs
[
 {
    from: '/react-native-app-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  ... 441 more items
].
​
(@netlify/plugin-nextjs onBuild completed in 1.2s)
​
────────────────────────────────────────────────────────────────
  4. Functions bundling                                         
────────────────────────────────────────────────────────────────
​
Packaging Functions from .netlify/functions-internal directory:
 - ___netlify-handler/___netlify-handler.js
 - ___netlify-odb-handler/___netlify-odb-handler.js
 - _ipx/_ipx.js
​
Packaging Functions from my_functions directory:
 - BannerForm.js
 - ContactForm.js
​
​
(Functions bundling completed in 52.2s)
​
────────────────────────────────────────────────────────────────
  5. @netlify/plugin-nextjs (onPostBuild event)                 
────────────────────────────────────────────────────────────────
​
Next.js cache saved.
The function zip .netlify/functions/___netlify-odb-handler.zip size is 70.6 MB, which is larger than the maximum supported size of 52.4 MB.
There are a few reasons this could happen. You may have accidentally bundled a large dependency, or you might have a
large number of pre-rendered pages included.
Contains 2602 files


These are the largest files in the zip:
┌─────────┬────────────────────────────────────────────────────────────────────────────────┬─────────────────┬───────────────────┐
│ (index) │                                      File                                      │ Compressed Size │ Uncompressed Size │
├─────────┼────────────────────────────────────────────────────────────────────────────────┼─────────────────┼───────────────────┤
│    1    │          'node_modules/sharp/vendor/8.10.6/lib/libvips-cpp.42.dylib'           │    '9.72 MB'    │     '22.8 MB'     │
│    2    │             'node_modules/react-dom/cjs/react-dom.development.js'              │    '249 kB'     │     '895 kB'      │
│    3    │       '.next/server/pages/services/mobile-application-development.html'        │    '174 kB'     │     '674 kB'      │
│    4    │        '.next/server/pages/services/react-native-app-development.html'         │    '175 kB'     │     '672 kB'      │
│    5    │     '.next/server/pages/services/mobile-application-development-faq.html'      │    '175 kB'     │     '672 kB'      │
│    6    │    '.next/server/pages/services/cloud-native-application-development.html'     │    '171 kB'     │     '658 kB'      │
│    7    │           '.next/server/pages/services/kubernetes-engineering.html'            │    '173 kB'     │     '654 kB'      │
│    8    │ '.next/server/pages/services/custom-web-application-development-services.html' │    '175 kB'     │     '651 kB'      │
│    9    │        '.next/server/pages/services/devops-source-code-management.html'        │    '170 kB'     │     '649 kB'      │
│   10    │          '.next/server/pages/services/application-modernization.html'          │    '171 kB'     │     '649 kB'      │
└─────────┴────────────────────────────────────────────────────────────────────────────────┴─────────────────┴───────────────────┘


For more information on fixing this, see https://ntl.fyi/large-next-functions
​
(@netlify/plugin-nextjs onPostBuild completed in 4.1s)
​
────────────────────────────────────────────────────────────────
  Netlify Build Complete                                        
────────────────────────────────────────────────────────────────
​
(Netlify Build completed in 2m 42.2s)

Function logs

Function logs
# Paste logs here

.next JSON files

generated .next JSON files
# Paste file contents here. Please check there isn't any private info in them
# You can either build locally, or download the deploy from Netlify by clicking the arrow next to the deploy time.

nikhil-toobler avatar Dec 24 '21 07:12 nikhil-toobler

Hi, Can you include more of the build logs please, particularly the messages from the earlier stages?

ascorbic avatar Dec 24 '21 09:12 ascorbic

hey @ascorbic added full logs here

hey @ascorbic added full logs here

────────────────────────────────────────────────────────────────
  Netlify Build                                                 
────────────────────────────────────────────────────────────────
​
❯ Version
  @netlify/build 26.0.2
​
❯ Flags
  dry: false
  offline: false
​
❯ Current directory
  /Users/user/hello
​
❯ Config file
  /Users/user/hello/netlify.toml
​
❯ Context
  build
​
❯ Loading plugins
   - @netlify/[email protected] from netlify.toml
​
────────────────────────────────────────────────────────────────
  1. @netlify/plugin-nextjs (onPreBuild event)                  
────────────────────────────────────────────────────────────────
​
No Next.js cache to restore.
Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed.
​
(@netlify/plugin-nextjs onPreBuild completed in 533ms)
​
────────────────────────────────────────────────────────────────
  2. build.command from netlify.toml                            
────────────────────────────────────────────────────────────────
​
$ npm run build

> [email protected] build
> next build

info  - Loaded env from /Users/user/hello/.env
info  - Checking validity of types  
info  - Creating an optimized production build  
info  - Compiled successfully
info  - Collecting page data  
[  ==] info  - Generating static pages (26/252)The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
[   =] info  - Generating static pages (33/252)The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
[  ==] info  - Generating static pages (217/252)The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
The render method must receive an object with a content field, which is an array
info  - Generating static pages (252/252)
info  - Finalizing page optimization  

Page                                                                         Size     First Load JS
┌ ● / (ISR: 1 Seconds) (3205 ms)                                             6.85 kB         135 kB
├   /_app                                                                    0 B            71.6 kB
├ ● /[slug] (ISR: 1 Seconds) (8297 ms)                                       4.83 kB         155 kB
├   ├ /seo-page-teamplate (735 ms) 
├   └ [+6 more paths] (avg 607 ms)
├ ○ /404 (ISR: 1 Seconds) (1180 ms)                                          2.8 kB         79.5 kB
├ ● /about-us (ISR: 1 Seconds) (1373 ms)                                     11.1 kB         104 kB
├ λ /api/BannerForm                                                          0 B            71.6 kB
├ λ /api/ContactForm                                                         0 B            71.6 kB
├ ● /blog (ISR: 1 Seconds) (1329 ms)                                         5.95 kB        82.7 kB
├ ● /blog/[slug] (ISR: 1 Seconds) (134710 ms)             
├   ├ /blog/blog2 (984 ms) 
├   └ [+161 more paths] (avg 794 ms)
├ ● /careers (ISR: 1 Seconds) (1358 ms)                                      4.53 kB        99.4 kB
├ ● /casestudy (ISR: 1 Seconds) (1478 ms)                                    15.3 kB         143 kB
├ ● /casestudy/[slug] (ISR: 1 Seconds) (12887 ms)                            6.86 kB         102 kB 
├   ├ /casestudy/interactive-survey-app (824 ms) 
├   └ [+7 more paths] (avg 791 ms)
├ ● /contact (ISR: 1 Seconds) (1366 ms)                                      3.72 kB         112 kB
├ ● /privacy-policy (ISR: 1 Seconds) (1275 ms)                               3.21 kB        98.1 kB
├ ● /services (ISR: 1 Seconds) (1679 ms)                                     3.88 kB         132 kB
└ ● /services/[slug] (ISR: 1 Seconds) (72394 ms)                             6.43 kB         157 kB 
    ├ /services/devops (2125 ms) 
    └ [+40 more paths] (avg 1435 ms)
+ First Load JS shared by all                                                71.6 kB
  ├ chunks/framework-91d7f78b5b4003c8.js                                     42 kB
  ├ chunks/main-d98b4a7f39fdfc80.js                                          28.2 kB
  ├ chunks/pages/_app-269cda3f93b1716d.js                                    505 B
  ├ chunks/webpack-378e68e29c265886.js                                       886 B
  └ css/87290897ccd2a049.css                                                 47.4 kB

λ  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
○  (Static)  automatically rendered as static HTML (uses no initial props)
●  (SSG)     automatically generated as static HTML + JSON (uses getStaticProps)
   (ISR)     incremental static regeneration (uses revalidate in getStaticProps)

​
(build.command completed in 1m 40.7s)
​
────────────────────────────────────────────────────────────────
  3. @netlify/plugin-nextjs (onBuild event)                     
────────────────────────────────────────────────────────────────
​
Moving static page files to serve from CDN...
Moved 2 files
The following routes use "revalidate" values of under 60 seconds, which is not supported.
They will use a revalidate time of 60 seconds instead.
┌─────────┬───────────────────────────────────────────────────────────────────────────────────────────────────┬────────────┐
│ (index) │                                               Route                                               │ Revalidate │
├─────────┼───────────────────────────────────────────────────────────────────────────────────────────────────┼────────────┤
│    0    │                                              '/404'                                               │     1      │
│    1    │                                              '/blog'                                              │     1      │
│    2    │                                            '/about-us'                                            │     1      │
│    3    │                                            '/careers'                                             │     1      │
│    4    │                                         '/privacy-policy'                                         │     1      │
└─────────┴───────────────────────────────────────────────────────────────────────────────────────────────────┴────────────┘
Netlify configuration property "redirects" value changed to [
  {
    from: '/*',
    query: {},
    to: '/404',
    status: 404,
    force: false,
    conditions: {},
    headers: {}
  },
  {
    from: '/_next/image*',
    query: { url: ':url', w: ':width', q: ':quality' },
    to: '/_ipx/w_:width,q_:quality/:url',
    status: 301
  },
  { from: '/_ipx/*', to: '/.netlify/builders/_ipx', status: 200 },
  { from: '/cache/*', to: '/404.html', status: 404, force: true },
  { from: '/server/*', to: '/404.html', status: 404, force: true },
  { from: '/serverless/*', to: '/404.html', status: 404, force: true },
  { from: '/traces', to: '/404.html', status: 404, force: true },
  {
    from: '/routes-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  {
    from: '/build-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  {
    from: '/prerender-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  {
    from: '/react-loadable-manifest.json',
    to: '/404.html',
    status: 404,
    force: true
  },
  { from: '/BUILD_ID', to: '/404.html', status: 404, force: true },
  { from: '/_next/static/*', to: '/static/:splat', status: 200 },
  {
    from: '/api',
    to: '/.netlify/functions/___netlify-handler',
    status: 200
  },
  {
    from: '/api/*',
    to: '/.netlify/functions/___netlify-handler',
    status: 200
  },
  {
    from: '/robots.txt',
    to: '/robots.txt',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/sitemap.xml',
    to: '/sitemap.xml',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/bg-line-pattern-2.svg',
    to: '/images/bg-line-pattern-2.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/bg-line-pattern.svg',
    to: '/images/bg-line-pattern.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/bg-map.svg',
    to: '/images/bg-map.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/bg-pattern-dark.svg',
    to: '/images/bg-pattern-dark.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/bg-pattern-transparent.svg',
    to: '/images/bg-pattern-transparent.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/bg-pattern.svg',
    to: '/images/bg-pattern.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/icon-arrow-square.svg',
    to: '/images/icon-arrow-square.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/icon-arrow.svg',
    to: '/images/icon-arrow.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/icon-hand.svg',
    to: '/images/icon-hand.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/icon-star.svg',
    to: '/images/icon-star.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/icon-tick.svg',
    to: '/images/icon-tick.svg',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/images/mail-logo.png',
    to: '/images/mail-logo.png',
    conditions: { Cookie: [Array] },
    status: 200
  },
  {
    from: '/*',
    to: '/.netlify/functions/___netlify-handler',
    status: 200,
    conditions: { Cookie: [Array] },
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/404.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/404',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/blog.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/blog',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/about-us.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/about-us',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/careers.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/careers',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/privacy-policy.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/privacy-policy',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/mobile-app-for-online-event-sharing.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/mobile-app-for-online-event-sharing',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/vehicle-moving-permit-application.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/vehicle-moving-permit-application',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/hospitality-management-application-case-study.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/hospitality-management-application-case-study',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/finance-application-development.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/finance-application-development',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/best-web-platform-for-businesses.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/best-web-platform-for-businesses',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/online-shopping-thats-just-shoes.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/online-shopping-thats-just-shoes',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/web-app-best-deals-market.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/web-app-best-deals-market',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/mobile-app-regatta-management.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/mobile-app-regatta-management',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/reduce-downtime-predictive-maintenance.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/reduce-downtime-predictive-maintenance',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/building-worlds-versatile-iot-tracker.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/building-worlds-versatile-iot-tracker',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/financial-data-management-web-app.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/financial-data-management-web-app',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/interactive-survey-app.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/interactive-survey-app',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/iot-based-inventory-management-app.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/iot-based-inventory-management-app',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy/web-app-for-smooth-parcel-service.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy/web-app-for-smooth-parcel-service',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/casestudy.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/casestudy',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/contact.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/contact',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/index.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/ecommerce-website-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/ecommerce-website-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/hire-offshore-development-team-for-your-startups.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/hire-offshore-development-team-for-your-startups',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },  
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/custom-web-app-development.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/custom-web-app-development',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/custom-web-application-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/custom-web-application-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/android-app-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/android-app-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/ios-app-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/ios-app-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/mobile-app-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/mobile-app-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/cloud-native-engineering-services.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/cloud-native-engineering-services',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/cross-platform-mobile-app-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/cross-platform-mobile-app-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/software-outsourcing-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/software-outsourcing-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/seo-page-teamplate.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/seo-page-teamplate',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/_next/data/JY1PWMwiyc8pAg_V5_vi6/react-native-app-development-company.json',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  {
    from: '/react-native-app-development-company',
    to: '/.netlify/builders/___netlify-odb-handler',
    status: 200,
    force: true
  },
  ... 441 more items
].
​
(@netlify/plugin-nextjs onBuild completed in 1.2s)
​
────────────────────────────────────────────────────────────────
  4. Functions bundling                                         
────────────────────────────────────────────────────────────────
​
Packaging Functions from .netlify/functions-internal directory:
 - ___netlify-handler/___netlify-handler.js
 - ___netlify-odb-handler/___netlify-odb-handler.js
 - _ipx/_ipx.js
​
Packaging Functions from my_functions directory:
 - BannerForm.js
 - ContactForm.js
​
​
(Functions bundling completed in 52.2s)
​
────────────────────────────────────────────────────────────────
  5. @netlify/plugin-nextjs (onPostBuild event)                 
────────────────────────────────────────────────────────────────
​
Next.js cache saved.
The function zip .netlify/functions/___netlify-odb-handler.zip size is 70.6 MB, which is larger than the maximum supported size of 52.4 MB.
There are a few reasons this could happen. You may have accidentally bundled a large dependency, or you might have a
large number of pre-rendered pages included.
Contains 2602 files


These are the largest files in the zip:
┌─────────┬────────────────────────────────────────────────────────────────────────────────┬─────────────────┬───────────────────┐
│ (index) │                                      File                                      │ Compressed Size │ Uncompressed Size │
├─────────┼────────────────────────────────────────────────────────────────────────────────┼─────────────────┼───────────────────┤
│    1    │          'node_modules/sharp/vendor/8.10.6/lib/libvips-cpp.42.dylib'           │    '9.72 MB'    │     '22.8 MB'     │
│    2    │             'node_modules/react-dom/cjs/react-dom.development.js'              │    '249 kB'     │     '895 kB'      │
│    3    │       '.next/server/pages/services/mobile-application-development.html'        │    '174 kB'     │     '674 kB'      │
│    4    │        '.next/server/pages/services/react-native-app-development.html'         │    '175 kB'     │     '672 kB'      │
│    5    │     '.next/server/pages/services/mobile-application-development-faq.html'      │    '175 kB'     │     '672 kB'      │
│    6    │    '.next/server/pages/services/cloud-native-application-development.html'     │    '171 kB'     │     '658 kB'      │
│    7    │           '.next/server/pages/services/kubernetes-engineering.html'            │    '173 kB'     │     '654 kB'      │
│    8    │ '.next/server/pages/services/custom-web-application-development-services.html' │    '175 kB'     │     '651 kB'      │
│    9    │        '.next/server/pages/services/devops-source-code-management.html'        │    '170 kB'     │     '649 kB'      │
│   10    │          '.next/server/pages/services/application-modernization.html'          │    '171 kB'     │     '649 kB'      │
└─────────┴────────────────────────────────────────────────────────────────────────────────┴─────────────────┴───────────────────┘


For more information on fixing this, see https://ntl.fyi/large-next-functions
​
(@netlify/plugin-nextjs onPostBuild completed in 4.1s)
​
────────────────────────────────────────────────────────────────
  Netlify Build Complete                                        
────────────────────────────────────────────────────────────────
​
(Netlify Build completed in 2m 42.2s)

nikhil-toobler avatar Dec 24 '21 11:12 nikhil-toobler

I've just removed some sensitive data from the logs, please pardon me.

nikhil-toobler avatar Dec 24 '21 11:12 nikhil-toobler

hello any updates here?

nikhil-toobler avatar Dec 27 '21 13:12 nikhil-toobler

I got the same problem. mine only exceeds few MB, 58.3 MB. I tried the same with Vercel, seems good on their end. Netlify should change their server if possible. limiting to 50mb is not cool at all.

gtwebsite avatar Dec 28 '21 04:12 gtwebsite

@tools-netlify @ascorbic any follow-up?

much thanks.

nikhil-toobler avatar Dec 30 '21 07:12 nikhil-toobler

@nikhil-toobler it's the holidays here. I'll get on it when I'm back at work next week

ascorbic avatar Dec 30 '21 08:12 ascorbic

thanks for the update @ascorbic, take your time. Happy holidays

nikhil-toobler avatar Dec 30 '21 09:12 nikhil-toobler

Hi @nikhil-toobler, This seems to be related to the large number of ISR pages, though a large part of it is because of libvips being included. I'm not sure why libvips is being included, as we specifically exclude it, and we're working on more efficient handling for ISR bundles, but in the meantime are you able to deploy from CI rather than from your local machine (which would solve the libvips issue), and switch the blog pages to fallback=blocking rather than ISR. I'm guessing they're unlikely to change after publishing.

ascorbic avatar Jan 04 '22 12:01 ascorbic

@gtwebsite the 50MB limit is from AWS, not us. It's a hard limit for Lambdas, and applies to Vercel too. You're probably avoiding it there because of a particular case of their bundling being slightly different. We're constantly working on ways to make bundling more efficient so that you don't hit these limits.

ascorbic avatar Jan 04 '22 12:01 ascorbic

@nikhil-toobler We ran into this issue when we moved to the latest version of this plugin. It forced us to take a look at the way we use getStaticPaths for dynamic pages. Our build was simply too big - we were pre-rendering too many pages up front during build time.

We took advantage of fallback: "blocking" (see docs here and here) for several of our sub-pages that use dynamic routes (topics/[slug] or glossary/[slug] etc), and it got rid of this build issue. We get the added benefit of slightly optimizing our builds and deferring the pre-rendering of less frequently accessed (older) pages.

naelkhann avatar Jan 04 '22 22:01 naelkhann

In most cases, if you have getStaticPaths without revalidate then you will avoid this issue, because the prerendered pages can be offloaded to the CDN. This isn't possible though with ISR, or if you have Next.js rewrites or middleware that point to those pages, as the site needs access to those rendered pages at runtime. The build logs should explain this in most cases.

ascorbic avatar Jan 05 '22 09:01 ascorbic

@ascorbic @naelkhann the pages are already in fallback: "blocking", we've set this through environment variable.

REACT_APP_STORYBLOK_REVALIDATE = true

export async function getStaticPaths() {
  const allBlogs = await getPaginateddata();
  return {
      paths: allBlogs?.map((blog) => `/${blog.full_slug}`) || [],
      fallback: process.env.REACT_APP_STORYBLOK_REVALIDATE === "false" ? false : 'blocking',
  }
}

nikhil-toobler avatar Jan 10 '22 06:01 nikhil-toobler

There are two things I'm not quite understanding in your example @nikhil-toobler, if you don't mind clarifying:

  1. The env var REACT_APP_STORYBLOK_REVALIDATE is true, which, by the ternary you use in getStaticPaths(), would return fallback: false not fallback: 'blocking'. In your real life example, is the env var REACT_APP_STORYBOK_REVALIDATE = false?
  2. If your array allBlogs has every blog post (I'm assuming by the name of the variable), you are not really taking advantage of fallback: 'blocking'. To make your builds smaller, allBlogs should really be something like someBlogs, where you are only fetching the paths of the critical or latest blog posts to pre-render at build time. The rest of the blog posts paths that are not in someBlogs will still be accessible by url/slug, but will be built at request time (because you specified the fallback: 'blocking' option). Just want to make sure you aren't still fetching all blogs here, because then you aren't really limiting the amount of pages you are pre-rendering. This may be the reason your builds are too large.

Please correct me if I'm wrong with this thought process @ascorbic

naelkhann avatar Jan 26 '22 16:01 naelkhann

hello @naelkhann, I've added revalidate and fallback values as follows.

REACT_APP_STORYBLOK_REVALIDATE = true - here env is set as true

so the return will be blocking and 1 respectively

export async function getStaticPaths() { 
  return { 
      fallback: process.env.REACT_APP_STORYBLOK_REVALIDATE === "false" ? false : 'blocking',
  }
}


export async function getStaticProps({ params, preview = null }) { 
    return { 
        revalidate: process.env.REACT_APP_STORYBLOK_REVALIDATE === "false" ? false : 1, 
    }
}

please correct me if anything wrong

nikhil-toobler avatar Jan 31 '22 15:01 nikhil-toobler

I'm having the exact same issue as OP described above. node_modules/sharp/vendor/8.10.6/lib/libvips-cpp.42 is being included in the bundle even though I'm explicitly ignoring it within netlify.toml in [functions]. As a result, the site fails to build. We leverage the git integration and have Netlify build instead of deploying via the CLI for context.

kristoferblack avatar Jun 09 '22 14:06 kristoferblack

I cannot exclude files too. I tried these variations, but none of these instructions can exclude node_modules/sharp/vendor/8.10.6/lib/libvips-cpp.42 file. To work around this, I am building less number of pages.

[functions]
  included_files = [
    "!./node_modules/sharp/vendor/**",
    "!node_modules/sharp/**",
    "!node_modules/sharp/vendor/8.12.2/linux-x64/lib/libvips-cpp.so.42"
  ]

joechoi-git avatar Jun 24 '22 20:06 joechoi-git

it seems that next is installing "sharp", without any way to disable that https://nextjs.org/docs/messages/install-sharp it's part of the image optimization what I'm going to do is to set a new function without next.js, that way I could get rid of "sharp" from taking up too much space

AlonMiz avatar Nov 19 '22 17:11 AlonMiz

Is there any fix for this? It's been a year. Can't build our NextJs sites on Netlify anymore due to this error regarding the sharp package and then the zip file exceeds 52 MB. The sites build fine on Vercel, so it's got nothing to do with AWS or anything. Netlify doesn't seem to be able to support the sharp package? node_modules/sharp/vendor/8.10.6/lib/libvips-cpp.42 is the problem.

osseonews avatar Nov 25 '22 23:11 osseonews

There are lots of possible reasons for bundle sizes being too large, but there is no reason that any function except _ipx should be including sharp, as it is explicitly excluded. If anyone is still experiencing that, then it would be helpful if you can share a reproduction if possible.

ascorbic avatar Nov 28 '22 10:11 ascorbic

I am not sure how to share a reproduction, but it is certainly till happening. I spent hours the other day trying every single solution to no avail and gave up. We really don't have many pages all. Are 150 pre-rendered pages a problem on Next? Doubtful. I've published sites with 10X more pages with no issues. And this same site worked on an older version of Next. After upgrading to Next 12.30 the build size shot the roof and it's impossible to get a build. Works fine on local and on vercel. The culprit is 100% sharp with the functions and the resulting function size is massive. I've attached a screenshot for you. Why this his happening is Next 12.30 is a mystery to me. Unfortunately, I messed around so much with our repo to try to fix this, that I can't even begin to understand what is going on anymore. (FYI, we don't even use any Edge functions at all in this repo, so no idea why they are packaging Edge functions, but maybe I don't understand the error messages)

netlify-screen

osseonews avatar Nov 28 '22 10:11 osseonews

@osseonews could you share a link to the deploy log page? If there are only 150 pages, I don't think it should have 4861 files in the zip, so I think something else may be going on too

ascorbic avatar Nov 29 '22 13:11 ascorbic

I can't really share a link to a log page, as it is private. Anyway, we run this same exact site on Netlify with NextJs 12.0.8 with no issues whatsoever. Only thing that changed is an upgrade to Next 12.30. This breaks the build b/c of the way Netlify is handling the sharp module. I guess Next upgraded the Image functionality in some way, and this requires new packages which break Netlify build. The site builds fine on Vercel with 12.30. There is obviously just some bug in Netlify. Maybe there aren't many customers who upgraded to 12.30 at Netlify, but other people clearly have had this same issue per above. Obviously, I'm not thrilled that I'll have to just move to Vercel, as I like Netlify so much more, but I can't spend days trying to figure out bugs on builds, and happens frequently when I upgrade Next and then try to build on Netlify.

osseonews avatar Nov 29 '22 13:11 osseonews

You can share the private link to the logs and I can use my admin access to view them.

ascorbic avatar Nov 29 '22 16:11 ascorbic

Where is the private link to the log?

osseonews avatar Nov 29 '22 17:11 osseonews

If you give me the site name I can look it up. So the slug in the URL after app.netlify.com/sites

ascorbic avatar Nov 30 '22 11:11 ascorbic

Thanks. I just opted to build on a new version of NextJs and I opened a ticket on Netlify community, which I think solved it. Thanks

osseonews avatar Dec 02 '22 18:12 osseonews

same issue here

I am not sure how to share a reproduction, but it is certainly till happening. I spent hours the other day trying every single solution to no avail and gave up. We really don't have many pages all. Are 150 pre-rendered pages a problem on Next? Doubtful. I've published sites with 10X more pages with no issues. And this same site worked on an older version of Next. After upgrading to Next 12.30 the build size shot the roof and it's impossible to get a build. Works fine on local and on vercel. The culprit is 100% sharp with the functions and the resulting function size is massive. I've attached a screenshot for you. Why this his happening is Next 12.30 is a mystery to me. Unfortunately, I messed around so much with our repo to try to fix this, that I can't even begin to understand what is going on anymore. (FYI, we don't even use any Edge functions at all in this repo, so no idea why they are packaging Edge functions, but maybe I don't understand the error messages)

netlify-screen

voyagebagage avatar Dec 15 '22 08:12 voyagebagage

@voyagebagage, can you share a link to your deploy logs pages?

nickytonline avatar Dec 15 '22 14:12 nickytonline

@nickytonline 5:09:50 PM: Build ready to start 5:09:53 PM: build-image version: 524714d1a66d1a967316f5c39465e22c77fdd56c (focal) 5:09:53 PM: build-image tag: v4.16.0 5:09:53 PM: buildbot version: 20016fa3be2cb5327259b6a1e0d4827aee5526e1 5:09:53 PM: Fetching cached dependencies 5:09:53 PM: Starting to download cache of 1.0GB 5:10:02 PM: Finished downloading cache in 8.64619514s 5:10:02 PM: Starting to extract cache 5:10:06 PM: Finished extracting cache in 4.444200163s 5:10:07 PM: Finished fetching cache in 13.214765828s 5:10:07 PM: Starting to prepare the repo for build 5:10:07 PM: Preparing Git Reference refs/heads/main 5:10:07 PM: Parsing package.json dependencies 5:10:08 PM: Section completed: initializing 5:10:08 PM: Starting build script 5:10:08 PM: Installing dependencies 5:10:08 PM: Python version set to 2.7 5:10:09 PM: Started restoring cached node version 5:10:09 PM: Finished restoring cached node version 5:10:10 PM: v16.19.0 is already installed. 5:10:10 PM: Now using node v16.19.0 (npm v8.19.3) 5:10:10 PM: Enabling node corepack 5:10:10 PM: Started restoring cached build plugins 5:10:10 PM: Finished restoring cached build plugins 5:10:10 PM: Attempting ruby version 2.7.2, read from environment 5:10:11 PM: Using ruby version 2.7.2 5:10:11 PM: Using PHP version 8.0 5:10:11 PM: Started restoring cached yarn cache 5:10:13 PM: Finished restoring cached yarn cache 5:10:13 PM: No yarn workspaces detected 5:10:13 PM: Started restoring cached node modules 5:10:13 PM: Finished restoring cached node modules 5:10:13 PM: Installing NPM modules using Yarn version 1.22.19 5:10:13 PM: yarn install v1.22.19 5:10:13 PM: [1/4] Resolving packages... 5:10:14 PM: [2/4] Fetching packages... 5:10:14 PM: [3/4] Linking dependencies... 5:10:14 PM: warning " > [email protected]" has unmet peer dependency "@popperjs/core@^2.11.6". 5:10:14 PM: warning " > [email protected]" has incorrect peer dependency "puppeteer-core@^10.1.0". 5:10:14 PM: warning "eslint-config-next > @typescript-eslint/parser > @typescript-eslint/typescript-estree > [email protected]" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta". 5:10:14 PM: warning "next-pwa > [email protected]" has unmet peer dependency "@babel/core@^7.0.0". 5:10:14 PM: warning "next-pwa > [email protected]" has unmet peer dependency "webpack@>=2". 5:10:14 PM: warning "next-pwa > [email protected]" has unmet peer dependency "webpack@>=4.0.0 <6.0.0". 5:10:14 PM: warning "next-pwa > [email protected]" has unmet peer dependency "webpack@^5.1.0". 5:10:14 PM: warning "next-pwa > [email protected]" has unmet peer dependency "webpack@^4.4.0 || ^5.9.0". 5:10:15 PM: [4/4] Building fresh packages... 5:10:15 PM: Done in 1.72s. 5:10:15 PM: NPM modules installed using Yarn 5:10:15 PM: Started restoring cached go cache 5:10:15 PM: Finished restoring cached go cache 5:10:16 PM: go version go1.19.4 linux/amd64 5:10:16 PM: /opt/build-bin/run-build-functions.sh: line 1034: /opt/buildhome/.gimme/env/go1.19.x.linux.amd64.env: No such file or directory 5:10:17 PM: Detected 1 framework(s) 5:10:17 PM: "next" at version "13.0.4" 5:10:17 PM: Installing missing commands 5:10:17 PM: Verify run directory 5:10:18 PM: ​ 5:10:18 PM: ──────────────────────────────────────────────────────────────── 5:10:18 PM: Netlify Build
5:10:18 PM: ──────────────────────────────────────────────────────────────── 5:10:18 PM: ​ 5:10:18 PM: ❯ Version 5:10:18 PM: @netlify/build 29.1.1 5:10:18 PM: ​ 5:10:18 PM: ❯ Flags 5:10:18 PM: baseRelDir: true 5:10:18 PM: buildId: 639af26ec728960008f64cee 5:10:18 PM: deployId: 639af26ec728960008f64cf0 5:10:18 PM: ​ 5:10:18 PM: ❯ Current directory 5:10:18 PM: /opt/build/repo 5:10:18 PM: ​ 5:10:18 PM: ❯ Config file 5:10:18 PM: /opt/build/repo/netlify.toml 5:10:18 PM: ​ 5:10:18 PM: ❯ Context 5:10:18 PM: production 5:10:18 PM: ​ 5:10:18 PM: ❯ Using Next.js Runtime - v4.29.3 5:10:19 PM: ​ 5:10:19 PM: ──────────────────────────────────────────────────────────────── 5:10:19 PM: 1. @netlify/plugin-nextjs (onPreBuild event)
5:10:19 PM: ──────────────────────────────────────────────────────────────── 5:10:19 PM: ​ 5:10:19 PM: Next.js cache restored. 5:10:19 PM: Netlify configuration property "build.environment.NEXT_PRIVATE_TARGET" value changed. 5:10:19 PM: ​ 5:10:19 PM: (@netlify/plugin-nextjs onPreBuild completed in 75ms) 5:10:19 PM: ​ 5:10:19 PM: ──────────────────────────────────────────────────────────────── 5:10:19 PM: 2. Build command from Netlify app
5:10:19 PM: ──────────────────────────────────────────────────────────────── 5:10:19 PM: ​ 5:10:19 PM: $ next build 5:10:20 PM: info - Linting and checking validity of types... 5:10:22 PM: info - Creating an optimized production build... 5:10:23 PM: > [PWA] Compile client (static) 5:10:23 PM: > [PWA] Auto register service worker with: /opt/build/repo/node_modules/next-pwa/register.js 5:10:23 PM: > [PWA] Service worker: /opt/build/repo/public/sw.js 5:10:23 PM: > [PWA] url: /sw.js 5:10:23 PM: > [PWA] scope: / 5:10:23 PM: > [PWA] Compile server 5:10:23 PM: > [PWA] Compile server 5:10:31 PM: info - Compiled successfully 5:10:31 PM: info - Collecting page data... 5:10:35 PM: info - Generating static pages (0/3) 5:10:35 PM: info - Generating static pages (3/3) 5:10:36 PM: info - Finalizing page optimization... 5:10:36 PM: Route (pages) Size First Load JS 5:10:36 PM: ┌ ○ / 12.6 kB 87.9 kB 5:10:36 PM: ├ /_app 0 B 75.4 kB 5:10:36 PM: ├ ○ /404 181 B 75.6 kB 5:10:36 PM: ├ λ /api/next-video 0 B 75.4 kB 5:10:36 PM: └ λ /api/next-video/youtube 0 B 75.4 kB 5:10:36 PM: + First Load JS shared by all 103 kB 5:10:36 PM: ├ chunks/framework-3b5a00d5d7e8d93b.js 45.4 kB 5:10:36 PM: ├ chunks/main-563c1e2f4eda0bcf.js 28.9 kB 5:10:36 PM: ├ chunks/pages/_app-6e95de486e303eab.js 295 B 5:10:36 PM: ├ chunks/webpack-ee7e63bc15b31913.js 815 B 5:10:36 PM: └ css/a683f7aba80bd015.css 27.5 kB 5:10:36 PM: λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps) 5:10:36 PM: ○ (Static) automatically rendered as static HTML (uses no initial props) 5:10:36 PM: ​ 5:10:36 PM: (build.command completed in 16.1s) 5:10:36 PM: ​ 5:10:36 PM: ──────────────────────────────────────────────────────────────── 5:10:36 PM: 3. @netlify/plugin-nextjs (onBuild event)
5:10:36 PM: ──────────────────────────────────────────────────────────────── 5:10:36 PM: ​ 5:10:36 PM: Could not find source file for page /api/next-video 5:10:36 PM: { functionsDir: '/opt/build/repo/.netlify/functions-internal' } 5:10:36 PM: Patching /opt/build/repo/node_modules/next/dist/server/base-server.js 5:10:36 PM: Done 5:10:36 PM: Patching /opt/build/repo/node_modules/next/dist/server/next-server.js 5:10:36 PM: Done 5:10:36 PM: Moving static page files to serve from CDN... 5:10:36 PM: Moved 1 files 5:10:36 PM: Netlify configuration property "redirects" value changed to [ 5:10:36 PM: { from: '/next/static/', to: '/static/:splat', status: 200 }, 5:10:36 PM: { 5:10:36 PM: from: '/_next/image', 5:10:36 PM: query: { url: ':url', w: ':width', q: ':quality' }, 5:10:36 PM: to: '/ipx/w:width,q:quality/:url', 5:10:36 PM: status: 301 5:10:36 PM: }, 5:10:36 PM: { from: '/_ipx/', to: '/.netlify/builders/_ipx', status: 200 }, 5:10:36 PM: { from: '/cache/', to: '/404.html', status: 404, force: true }, 5:10:36 PM: { from: '/server/', to: '/404.html', status: 404, force: true }, 5:10:36 PM: { from: '/serverless/', to: '/404.html', status: 404, force: true }, 5:10:36 PM: { from: '/trace', to: '/404.html', status: 404, force: true }, 5:10:36 PM: { from: '/traces', to: '/404.html', status: 404, force: true }, 5:10:36 PM: { 5:10:36 PM: from: '/routes-manifest.json', 5:10:36 PM: to: '/404.html', 5:10:36 PM: status: 404, 5:10:36 PM: force: true 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/build-manifest.json', 5:10:36 PM: to: '/404.html', 5:10:36 PM: status: 404, 5:10:36 PM: force: true 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/prerender-manifest.json', 5:10:36 PM: to: '/404.html', 5:10:36 PM: status: 404, 5:10:36 PM: force: true 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/react-loadable-manifest.json', 5:10:36 PM: to: '/404.html', 5:10:36 PM: status: 404, 5:10:36 PM: force: true 5:10:36 PM: }, 5:10:36 PM: { from: '/BUILD_ID', to: '/404.html', status: 404, force: true }, 5:10:36 PM: { 5:10:36 PM: from: '/api/', 5:10:36 PM: to: '/.netlify/functions/___netlify-handler', 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/favicon.ico', 5:10:36 PM: to: '/favicon.ico', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/icon-192x192.png', 5:10:36 PM: to: '/icon-192x192.png', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/icon-256x256.png', 5:10:36 PM: to: '/icon-256x256.png', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/icon-384x384.png', 5:10:36 PM: to: '/icon-384x384.png', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/icon-512x512.png', 5:10:36 PM: to: '/icon-512x512.png', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/manifest.json', 5:10:36 PM: to: '/manifest.json', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/sw.js', 5:10:36 PM: to: '/sw.js', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/vercel.svg', 5:10:36 PM: to: '/vercel.svg', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/workbox-588899ac.js', 5:10:36 PM: to: '/workbox-588899ac.js', 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: status: 200 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/', 5:10:36 PM: to: '/.netlify/functions/___netlify-handler', 5:10:36 PM: status: 200, 5:10:36 PM: conditions: { Cookie: [Array] }, 5:10:36 PM: force: true 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/_next/data/hgNpv_UR42gtqfKUHS2oo/index.json', 5:10:36 PM: to: '/.netlify/functions/___netlify-handler', 5:10:36 PM: status: 200, 5:10:36 PM: force: false 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/', 5:10:36 PM: to: '/.netlify/functions/___netlify-handler', 5:10:36 PM: status: 200, 5:10:36 PM: force: false 5:10:36 PM: }, 5:10:36 PM: { 5:10:36 PM: from: '/*', 5:10:36 PM: to: '/.netlify/functions/___netlify-handler', 5:10:36 PM: status: 200 5:10:36 PM: } 5:10:36 PM: ]. 5:10:36 PM: ​ 5:10:36 PM: (@netlify/plugin-nextjs onBuild completed in 106ms) 5:10:36 PM: ​ 5:10:36 PM: ──────────────────────────────────────────────────────────────── 5:10:36 PM: 4. Functions bundling
5:10:36 PM: ──────────────────────────────────────────────────────────────── 5:10:36 PM: ​ 5:10:36 PM: Packaging Functions from .netlify/functions-internal directory: 5:10:36 PM: - ___netlify-handler/___netlify-handler.js 5:10:36 PM: - ___netlify-odb-handler/___netlify-odb-handler.js 5:10:36 PM: - _ipx/_ipx.js 5:10:36 PM: ​ 5:10:52 PM: ​ 5:10:52 PM: (Functions bundling completed in 16.6s) 5:10:52 PM: ​ 5:10:52 PM: ──────────────────────────────────────────────────────────────── 5:10:52 PM: 5. Edge Functions bundling
5:10:52 PM: ──────────────────────────────────────────────────────────────── 5:10:52 PM: ​ 5:10:53 PM: ​ 5:10:53 PM: (Edge Functions bundling completed in 200ms) 5:10:53 PM: ​ 5:10:53 PM: ──────────────────────────────────────────────────────────────── 5:10:53 PM: 6. @netlify/plugin-nextjs (onPostBuild event)
5:10:53 PM: ──────────────────────────────────────────────────────────────── 5:10:53 PM: ​ 5:10:53 PM: Next.js cache saved. 5:10:53 PM: The function zip ../../../tmp/zisi-639af26ec728960008f64cf0/___netlify-odb-handler.zip size is 54.5 MB, which is larger than the maximum supported size of 52.4 MB. 5:10:53 PM: There are a few reasons this could happen. You may have accidentally bundled a large dependency, or you might have a 5:10:53 PM: large number of pre-rendered pages included. 5:10:53 PM: Contains 1371 files 5:10:53 PM: 5:10:53 PM: 5:10:53 PM: Creating deploy upload records 5:10:53 PM: These are the largest files in the zip: 5:10:53 PM: ┌─────────┬──────────────────────────────────────────────────────────────────────────┬─────────────────┬───────────────────┐ 5:10:53 PM: │ (index) │ File │ Compressed Size │ Uncompressed Size │ 5:10:53 PM: ├─────────┼──────────────────────────────────────────────────────────────────────────┼─────────────────┼───────────────────┤ 5:10:53 PM: │ 1 │ 'node_modules/chrome-aws-lambda/bin/chromium.br' │ '46.9 MB' │ '47 MB' │ 5:10:53 PM: │ 2 │ 'node_modules/chrome-aws-lambda/bin/aws.tar.br' │ '1.56 MB' │ '1.56 MB' │ 5:10:53 PM: │ 3 │ 'node_modules/next/dist/compiled/react-dom/cjs/react-dom.development.js' │ '324 kB' │ '1.19 MB' │ 5:10:53 PM: │ 4 │ 'node_modules/react-dom/cjs/react-dom.development.js' │ '281 kB' │ '1.03 MB' │ 5:10:53 PM: │ 5 │ 'node_modules/chrome-aws-lambda/bin/swiftshader.tar.br' │ '1.01 MB' │ '1.01 MB' │ 5:10:53 PM: │ 6 │ 'node_modules/next/dist/compiled/@edge-runtime/primitives/encoding.js' │ '227 kB' │ '683 kB' │ 5:10:53 PM: │ 7 │ 'node_modules/next/dist/compiled/node-fetch/index.js' │ '260 kB' │ '592 kB' │ 5:10:53 PM: │ 8 │ 'node_modules/next/dist/compiled/terser/bundle.min.js' │ '150 kB' │ '499 kB' │ 5:10:53 PM: │ 9 │ 'node_modules/next/dist/compiled/@edge-runtime/primitives/fetch.js' │ '123 kB' │ '475 kB' │ 5:10:53 PM: │ 10 │ 'node_modules/next/dist/compiled/@edge-runtime/primitives/url.js' │ '105 kB' │ '410 kB' │ 5:10:53 PM: └─────────┴──────────────────────────────────────────────────────────────────────────┴─────────────────┴───────────────────┘ 5:10:53 PM: 5:10:53 PM: 5:10:53 PM: For more information on fixing this, see https://ntl.fyi/large-next-functions 5:10:53 PM: ​ 5:10:53 PM: (@netlify/plugin-nextjs onPostBuild completed in 83ms) 5:10:53 PM: ​ 5:10:53 PM: ──────────────────────────────────────────────────────────────── 5:10:53 PM: 7. Deploy site
5:10:53 PM: ──────────────────────────────────────────────────────────────── 5:10:53 PM: ​ 5:10:53 PM: Starting to deploy site from '.next' 5:10:53 PM: Creating deploy tree 5:10:53 PM: 21 new files to upload 5:10:53 PM: 3 new functions to upload 5:11:05 PM: Section completed: deploying 5:11:05 PM: Site deploy was successfully initiated 5:11:05 PM: ​ 5:11:05 PM: (Deploy site completed in 11.8s) 5:11:05 PM: ​ 5:11:05 PM: ──────────────────────────────────────────────────────────────── 5:11:05 PM: Starting post processing 5:11:05 PM: Netlify Build Complete
5:11:05 PM: ──────────────────────────────────────────────────────────────── 5:11:05 PM: ​ 5:11:05 PM: (Netlify Build completed in 46.6s) 5:11:05 PM: Caching artifacts 5:11:05 PM: Post processing - HTML 5:11:05 PM: Started saving node modules 5:11:05 PM: Finished saving node modules 5:11:05 PM: Started saving build plugins 5:11:05 PM: Finished saving build plugins 5:11:05 PM: Started saving yarn cache 5:11:05 PM: Post processing - header rules 5:11:05 PM: Post processing - redirect rules 5:11:05 PM: Post processing done 5:11:06 PM: Section completed: postprocessing 5:11:07 PM: Finished saving yarn cache 5:11:07 PM: Started saving pip cache 5:11:07 PM: Finished saving pip cache 5:11:07 PM: Started saving emacs cask dependencies 5:11:07 PM: Finished saving emacs cask dependencies 5:11:07 PM: Started saving maven dependencies 5:11:07 PM: Finished saving maven dependencies 5:11:07 PM: Started saving boot dependencies 5:11:07 PM: Finished saving boot dependencies 5:11:07 PM: Started saving rust rustup cache 5:11:07 PM: Finished saving rust rustup cache 5:11:07 PM: Started saving go dependencies 5:11:07 PM: Finished saving go dependencies 5:11:07 PM: Build script success 5:11:07 PM: Section completed: building 5:11:09 PM: Site is live ✨ 5:11:10 PM: Uploading Cache of size 1.0GB 5:11:17 PM: Section completed: cleanup 5:11:17 PM: Finished processing build request in 1m23.944658598s

voyagebagage avatar Dec 23 '22 09:12 voyagebagage