Skip to content

Attempted import error: 'validOperatorSet' is not exported from 'payload/shared' (imported as 'CM'). #10906

@blackmouse572

Description

@blackmouse572

Describe the Bug

While trying to use search plugin to add my own collections by adding to the list

  searchPlugin({
    collections: ['posts', 'stories', 'chapters'],
    beforeSync: beforeSyncWithSearch,
    searchOverrides: {
      fields: ({ defaultFields }) => {
        return [...defaultFields, ...searchFields]
      },
    },
  }),

After navigate to /admin i got

Image

I have tried:

  • Remove the node_modules folders and install again
  • Use all latest package of payload

Link to the code that reproduces this issue

https://github.com/blackmouse572/Monga

Reproduction Steps

  1. Install packages with yarn
  2. Navigate to localhost:3000/admin

Which area(s) are affected? (Select all that apply)

area: core, plugin: search

Environment Info

Binaries:
  Node: 20.18.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.17.1
  next: 15.1.5
  @payloadcms/db-postgres: 3.17.1
  @payloadcms/email-nodemailer: 3.17.1
  @payloadcms/graphql: 3.17.1
  @payloadcms/live-preview: 3.17.1
  @payloadcms/live-preview-react: 3.17.1
  @payloadcms/next/utilities: 3.17.1
  @payloadcms/payload-cloud: 3.17.1
  @payloadcms/plugin-form-builder: 3.17.1
  @payloadcms/plugin-nested-docs: 3.17.1
  @payloadcms/plugin-redirects: 3.17.1
  @payloadcms/plugin-search: 3.20.0
  @payloadcms/plugin-seo: 3.17.1
  @payloadcms/richtext-lexical: 3.17.1
  @payloadcms/translations: 3.17.1
  @payloadcms/ui/shared: 3.17.1
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home Single Language
  Available memory (MB): 14189
  Available CPU cores: 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions