Search stopped working

Hello!
I am looking for some help. We have Ghost 4 version. After updating to 4 version our search worked fine. But yesterday we found that it doesn`t work. Please, help me to find the reason.
This is our script:

 let ghostSearch = new GhostSearch({
    key: ghost_key,
    url: ghost_host,
    version: 'v3',
    template: function(result) {
      const date = new Date(result.published_at);
      const ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(date);
      const mo = new Intl.DateTimeFormat('en', { month: 'short' }).format(date);
      const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(date);

      const publishedDate = `${da} ${mo} ${ye}`;

      return  '<div class="search__result-post">' +
          '<h5 class="search__result-title"><a href="' + result.url + '">' + result.title + '</a></h5>' +
          '<p class="search__result-date">' + publishedDate + '</p>' +
          '</div>';
    },
    trigger: 'focus',
    api: {
      resource: 'posts',
      parameters: {
          limit: 'all',
          fields: ['title', 'url', 'published_at'],
          filter: '',
          include: '',
          order: '',
          formats: '',
      },
    }
  });

Error:
app.min.js?v=db652bb1cb:1 TypeError: Cannot read properties of undefined (reading ‘parse’)
at app.min.js?v=db652bb1cb:1:57370
at new Promise ()
at Ti.adapter.Ai (app.min.js?v=db652bb1cb:1:56992)
at Li (app.min.js?v=db652bb1cb:1:61495)
at Mi.request (app.min.js?v=db652bb1cb:1:64676)
at Mi. [as get] (app.min.js?v=db652bb1cb:1:64991)
at Function.get (app.min.js?v=db652bb1cb:1:49118)
at zi (app.min.js?v=db652bb1cb:1:66240)
at o (app.min.js?v=db652bb1cb:1:69894)
at Object.browse (app.min.js?v=db652bb1cb:1:69061)

Hello!
I found that it happened after I have installed it all on the new laptop. Package.json is the same. BUT now Ghost-CLI version: 1.21.0, it was 1.18.2.
I suppose that problem is in @tryghost/content-api, because it is the difference in script.js now without any changes from my side. Now it is:

module?module.exports=t(require("url")):"function"==typeof define&&define.amd?define(["url"],

before it was:

module?module.exports=t():"function"==typeof define&&define.amd?define(t)

Finally, I have found the solution. I still don`t understand why, but my compiled app.min.js file changes without any changes from my side. But I have updated dependency @tryghost/content-api to a new version and the search started working again!