Home App Docs Blog Github

Build errors, seemingly fetching non-existent collections

Getting the following build error when trying to build my app locally. same error when trying to deploy to vercel. Any advice would be greatly appreciated!

info  - Generating static pages (38/38)

> Build error occurred
Error: Export encountered errors on following paths:
        /en-US/collection/men
        /en-US/collection/spring
        /en-US/collection/womens

 
at project/node_modules/next/dist/export/index.js:31:1106
at async Span.traceAsyncFn (project/node_modules/next/dist/telemetry/trace/trace.js:5:584)
at async project/node_modules/next/dist/build/index.js:43:49
at async Span.traceAsyncFn (project/node_modules/next/dist/telemetry/trace/trace.js:5:584)
at async project/node_modules/next/dist/build/index.js:25:1475
at async Span.traceAsyncFn (project/node_modules/next/dist/telemetry/trace/trace.js:5:584)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nextjs-commerce@1.0.0 build: `next build`
npm ERR! Exit status 1


Ok, So I figured this one out, or at least figured out a workaround.

By adding collections by the name ‘men’ ‘spring’ and ‘womens’ to my store, it fixes this build issue. I could not for the life of me figure out where i was still trying to fetch from those collections however, so some help with that would still be appreciated