saleor / saleor-storefront

A GraphQL-powered, NextJs-based, PWA storefront for Saleor. IMPORTANT: This project is [DEPRECATED] in favor of saleor/react-storefront soon to become our default demo and storefront starter pack.
https://demo.saleor.io/
BSD 3-Clause "New" or "Revised" License
770 stars 672 forks source link

build export error #1032

Closed ktmswzw closed 3 years ago

ktmswzw commented 3 years ago

What I'm trying to achieve

… npm run build:export or npm run build

Steps to reproduce the problem

[====] info - Generating static pages (3/5) Error occurred prerendering page "/category/home-ozone-generator". Read more: https://err.sh/next.js/prerender-error TypeError: Cannot read property 'products' of null at getFeaturedProducts (/home/vincent/web/storefront/.next/server/pages/_app.js:13842:31) at process._tickCallback (internal/process/next_tick.js:68:7) [= ] info - Generating static pages (3/5) Error occurred prerendering page "/category/industry-ozone-generator". Read more: https://err.sh/next.js/prerender-error TypeError: Cannot read property 'products' of null at getFeaturedProducts (/home/vincent/web/storefront/.next/server/pages/_app.js:13842:31) at process._tickCallback (internal/process/next_tick.js:68:7) info - Generating static pages (5/5)

Build error occurred Error: Export encountered errors on following paths: /category/home-ozone-generator /category/industry-ozone-generator at nextExportSpan.traceAsyncFn (/home/vincent/web/storefront/node_modules/next/dist/export/index.js:31:1103) at process._tickCallback (internal/process/next_tick.js:68:7) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! saleor-site@3.0.0-a.0 build: next build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the saleor-site@3.0.0-a.0 build script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2021-04-22T14_44_41_402Z-debug.log [root@central-nginx storefront]#

What I expected to happen

Screenshots

image

System information

Saleor version:

Operating system:

ruiconti commented 3 years ago

Any insights on what might be causing this issue?

Edit: This appears to have been fixed on #1055.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.