#Issue using form builder plugin with payload 3.0

8 messages · Page 1 of 1 (latest)

hollow slate
#

Hello,

I'm trying to use the form builder plugin in my nextjs project but i have this error :

https://nextjs.org/docs/messages/module-not-found
⨯ ./node_modules/.pnpm/@payloadcms+plugin-form-builder@1.2.2_payload@3.0.0-beta.97_graphql@16.9.0_monaco-editor@0.38_3awrgquf7pkaos6w45chn3tfwa/node_modules/@payloadcms/plugin-form-builder/dist/collections/Forms/DynamicFieldSelector.js
Module not found: Package path ./components/forms is not exported from package C:\Users\guill\Desktop\frontendmentor.io\myteam-multi-page-website\node_modules.pnpm@payloadcms+plugin-form-builder@1.2.2_payload@3.0.0-beta.97_graphql@16.9.0_monaco-editor@0.38_3awrgquf7pkaos6w45chn3tfwa\node_modules\payload (see exports field in C:\Users\guill\Desktop\frontendmentor.io\myteam-multi-page-website\node_modules.pnpm@payloadcms+plugin-form-builder@1.2.2_payload@3.0.0-beta.97_graphql@16.9.0_monaco-editor@0.38_3awrgquf7pkaos6w45chn3tfwa\node_modules\payload\package.json)

Can you please help me ?

lucid folioBOT
knotty bloom
#

What is the output from of payload info?

cursive crane
cursive crane
# hollow slate Hello, I'm trying to use the form builder plugin in my nextjs project but i hav...

I just solved the problem:

Make sure in your package.json file the plugin package is the same version as your other packages. For example:

    "@payloadcms/ui": "3.0.0-beta.80",
    "@payloadcms/plugin-form-builder": "3.0.0-beta.80",

Second of all, contrary to the docs the current name of the form builder in the config file is not formBuilder() but formBuilderPlugin(). Here is an example buildConfig:

export default buildConfig({
  editor: lexicalEditor(),
  collections: [UsersCollection, MediaCollection, PostsCollection, CategoriesCollection],
  plugins: [formBuilderPlugin({})],
  secret: process.env.PAYLOAD_SECRET || '',
  typescript: {
    outputFile: path.resolve(dirname, 'payload-types.ts'),
  },
  db: postgresAdapter({
    pool: {
      connectionString: process.env.POSTGRES_URI || '',
    },
  }),
  /**
   * Payload can now accept specific translations from 'payload/i18n/en'
   * This is completely optional and will default to English if not provided
   */
  i18n: {
    supportedLanguages: { en },
  },
}
knotty bloom
#

A version checker was added in later versions to let you know you're running mismatched package versions.

#

Also be sure when you're in the docs, to use the right drop-down to select beta

lucid folioBOT