shopwareLabs / nextjs-shopware-starter

Shopware + Next.js Commerce
https://nextjs-shopware-starter.vercel.app
MIT License
41 stars 12 forks source link

TypeError: Cannot read properties of undefined (reading 'reduce')] #14

Closed animencoding closed 7 months ago

animencoding commented 7 months ago

Issue Description: Problem Encountering a TypeError during the execution of the shopware integration. The error message specifically states: "Cannot read properties of undefined (reading 'reduce')".

running dockware on docker-compose using admin-api

any idea what's causing this?

animencoding commented 7 months ago

i have no idea what's this

[useListing][search] Did not found any category with collection name: Summer-BBQ/Hidden-Carousel-Category


> dev
> next dev

   ▲ Next.js 14.0.0
   - Local:        http://localhost:3000
   - Environments: .env

 ✓ Ready in 2.8s
 ○ Compiling /page ...
 ✓ Compiled /page in 8.7s (1032 modules)
==> [TypeError: Cannot read properties of undefined (reading 'reduce')]
[useListing][search] Did not found any category with collection name: Summer-BBQ/Hidden-Carousel-Category
==> [TypeError: Cannot read properties of undefined (reading 'reduce')]
[useListing][search] Did not found any category with collection name: Summer-BBQ/Hidden-Category
==> [TypeError: Cannot read properties of undefined (reading 'reduce')]
==> [TypeError: Cannot read properties of undefined (reading 'reduce')]
==> [TypeError: Cannot read properties of undefined (reading 'reduce')]
 ✓ Compiled /favicon.ico/route in 495ms (37 modules)
animencoding commented 7 months ago

i gave up on deploying on my local machine and used vercel now i get this error is this frontend actually ready for people to use or just some facade i really need to know if i'm able to use shopware with next commerce

  errors: [
  {
  status: '404',
  code: 'PRODUCT__CATEGORY_NOT_FOUND',
  title: 'Not Found',
  detail: 'Could not find category with id "ff7bf3c59f1342a685844fbf8fdf9dc8"',
  meta: {
  parameters: {
  entity: 'category',
  field: 'id',
  value: 'ff7bf3c59f1342a685844fbf8fdf9dc8'
}
animencoding commented 7 months ago

Solution Edit:

components/carousel.tsx 
components/grid/three-items.tsx

Change the hard-coded ID with your own (you can obtain it from the URL in the admin panel).

Had more issues with Shopware that I decided to switch completely. I advise anyone reading this to look for alternatives, since support for Shopware is almost nonexistent.