I created a Netlify account for a nonprofit with their email, so I’m using my personal email for this forum.
Basically, I have never been able to deploy my site for some reason. And the errors are very vague. Also, I know the problem isn’t my use of the tag because I’ve tried to deploy it without them and with using the element from next/image, but I didn’t have any luck still.
Netlify site name: rad-conkies-82b2b7
9:07:36 PM: Netlify Build
9:07:36 PM: ────────────────────────────────────────────────────────────────
9:07:36 PM:
9:07:36 PM: ❯ Version
9:07:36 PM: @netlify/build 29.17.1
9:07:36 PM:
9:07:36 PM: ❯ Flags
9:07:36 PM: baseRelDir: true
9:07:36 PM: buildId: 64bddcc133a8cd7ec5944fe7
9:07:36 PM: deployId: 64bddcc133a8cd7ec5944fe9
9:07:36 PM:
9:07:36 PM: ❯ Current directory
9:07:36 PM: /opt/build/repo
9:07:36 PM:
9:07:36 PM: ❯ Config file
9:07:36 PM: No config file was defined: using default values.
9:07:36 PM:
9:07:36 PM: ❯ Context
9:07:36 PM: production
9:07:36 PM:
9:07:36 PM: Build command from Netlify app
9:07:36 PM: ────────────────────────────────────────────────────────────────
9:07:36 PM:
9:07:36 PM: $ npm run build
9:07:36 PM: > react-to-next@0.1.0 build
9:07:36 PM: > next build
9:07:37 PM: - info Linting and checking validity of types…
9:07:38 PM: ./components/Card.js
9:07:38 PM: 15:9 Warning: Using <img>
could result in slower LCP and higher bandwidth. Consider using <Image />
from next/image
to automatically optimize images. This may incur additional usage or cost from your provider. See: No img element | Next.js @next/next/no-img-element
9:07:38 PM: ./components/HeroSection.js
9:07:38 PM: 21:9 Warning: Using <img>
could result in slower LCP and higher bandwidth. Consider using <Image />
from next/image
to automatically optimize images. This may incur additional usage or cost from your provider. See: No img element | Next.js @next/next/no-img-element
9:07:38 PM: info - Need to disable some ESLint rules? Learn more here: Configuring: ESLint | Next.js
9:07:38 PM: - info Creating an optimized production build…
9:07:49 PM: Failed during stage ‘building site’: Build script returned non-zero exit code: 2 (Search results for '"non-zero exit code: 2"' - Netlify Support Forums)
9:07:44 PM: - info Compiled successfully
9:07:44 PM: - info Collecting page data…
9:07:45 PM: - info Generating static pages (0/6)
9:07:46 PM: - info Generating static pages (1/6)
9:07:46 PM: - info Generating static pages (2/6)
9:07:46 PM: - info Generating static pages (4/6)
9:07:46 PM: - info Generating static pages (6/6)
9:07:47 PM: - info Finalizing page optimization…
9:07:47 PM: Route (pages) Size First Load JS
9:07:47 PM: ┌ ○ / 2.81 kB 114 kB
9:07:47 PM: ├ └ css/f799f044ffcd12a2.css 1.38 kB
9:07:47 PM: ├ /_app 0 B 111 kB
9:07:47 PM: ├ ○ /404 182 B 111 kB
9:07:47 PM: ├ ○ /about-us 1.3 kB 112 kB
9:07:47 PM: ├ └ css/9d364360b27192f7.css 609 B
9:07:47 PM: ├ ○ /news 264 B 111 kB
9:07:47 PM: └ ○ /our-programs 1.28 kB 112 kB
9:07:47 PM: └ css/57324d48ebbafd40.css 517 B
9:07:47 PM: + First Load JS shared by all 113 kB
9:07:47 PM: ├ chunks/framework-f9926060a251d613.js 45.2 kB
9:07:47 PM: ├ chunks/main-ad82b3f16479a685.js 32.9 kB
9:07:47 PM: ├ chunks/pages/_app-06e2418107ccdc6c.js 32.1 kB
9:07:47 PM: ├ chunks/webpack-b8f8d6679aaa5f42.js 755 B
9:07:47 PM: └ css/89012c4647db1c7b.css 1.87 kB
9:07:47 PM: ○ (Static) automatically rendered as static HTML (uses no initial props)
9:07:47 PM:
9:07:47 PM: (build.command completed in 10.9s)
9:07:47 PM:
9:07:49 PM: Build failed due to a user error: Build script returned non-zero exit code: 2
9:07:49 PM: Failing build: Failed to build site
9:07:49 PM: Finished processing build request in 32.067s