Strapi error inside types

System Information
  • Strapi Version: 3.5.2
  • Operating System:
  • Database: PostgreSQL
  • Node Version:
  • NPM Version:
  • Yarn Version:

Hello, I am getting an error, when trying to enter in strapi single types “cannot read property editRelations of undefined”. On localhost everything is ok, but on deployed project this error is appeared always. After redeploying everything is ok, but later this error is coming back. Do you have any idea what is it and how can I fix it?

would smbd answer me?

Can you share your model file for this single type?

{

  "kind": "singleType",

  "collectionName": "shops",

  "info": {

    "name": "Shop",

    "description": ""

  },

  "options": {

    "increments": true,

    "timestamps": true,

    "draftAndPublish": true

  },

  "attributes": {

    "runningText": {

      "type": "text"

    },

    "carousel": {

      "collection": "file",

      "via": "related",

      "allowedTypes": [

        "images",

        "files",

        "videos"

      ],

      "plugin": "upload",

      "required": false

    },

    "middleBanner": {

      "model": "file",

      "via": "related",

      "allowedTypes": [

        "images",

        "files",

        "videos"

      ],

      "plugin": "upload",

      "required": false

    },

    "bottomBanner": {

      "model": "file",

      "via": "related",

      "allowedTypes": [

        "images",

        "files",

        "videos"

      ],

      "plugin": "upload",

      "required": false

    },

    "product": {

      "model": "products"

    },

    "catalogCarousel": {

      "collection": "file",

      "via": "related",

      "allowedTypes": [

        "images",

        "files",

        "videos"

      ],

      "plugin": "upload",

      "required": false

    },

    "maxOrderWeight": {

      "type": "float"

    },

    "maxOrderPrice": {

      "type": "float"

    },

    "TermsAndConditions": {

      "type": "richtext"

    },

    "vat": {

      "type": "float"

    },

    "shipByPostPrice": {

      "type": "float"

    },

    "courierPrice": {

      "type": "float"

    },

    "BuyPolicy": {

      "type": "richtext"

    },

    "TermsAndConditionsHebrew": {

      "type": "richtext"

    },

    "BuyPolicyHebrew": {

      "type": "richtext"

    },

    "posts": {

      "type": "component",

      "repeatable": true,

      "component": "websites.posts"

    },

    "categories": {

      "type": "component",

      "repeatable": true,

      "component": "websites.categories"

    },

    "contactUs": {

      "type": "component",

      "repeatable": false,

      "component": "websites.contact-us"

    },

    "socialMedia": {

      "type": "component",

      "repeatable": false,

      "component": "websites.social-media"

    },

    "products": {

      "type": "component",

      "repeatable": true,

      "component": "websites.products"

    },

    "CustomerService": {

      "type": "richtext"

    },

    "CustomerServiceHebrew": {

      "type": "richtext"

    }

  }

}

Hmm, from my point of view it looks ok, let’s dig deeper into the problem.

What Strapi version do you use? Can you check if on prod and dev you have the same version?
Can you explain how you exactly deploy your app? Do you run yarn install and yarn build --clean on production during deployment?

I am using 3.5.3 version of Strapi and installing of packages is going from Docker automatically. For deploy I am running strapi build, and after deploying it to google cloud. After redeploy everything is working and I can change content, but for some reason after a time this problem is appearing and I don’t have an idea why.
P.S. even if this error is in my strapi, my UI can fetch data from this single type.

so what’s a reason can be of this issue?

Deleting node_modules, build and .cache directory and reinstall everthing solved the issue for me.