Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0.0-beta.36] generate:types fails when nestedDocs plugin is installed #6548

Closed
sriechersrc opened this issue May 29, 2024 · 4 comments
Closed
Labels

Comments

@sriechersrc
Copy link

Link to reproduction

No response

Payload Version

v3 beta

Node Version

v20.10.0

Next.js Version

15.0.0-rc.0

Describe the Bug

When including the nestedDocs plugins payload generate:types throws TypeError: nestedDocs is not a function. If
I comment out the plugin, it works as expected.

The Plugin config looks like this:
Bildschirmfoto 2024-05-29 um 16 12 20

Reproduction Steps

  1. Install the plugin
  2. Add it to the plugins field in the payload config
  3. Run npm payload generate:types

Adapters and Plugins

nestedDocs, db-postgres

@sriechersrc sriechersrc added status: needs-triage Possible bug which hasn't been reproduced yet v3 labels May 29, 2024
@sriechersrc sriechersrc changed the title generate:types fails when nestedDocs plugin is installed [3.0.0-beta.36] generate:types fails when nestedDocs plugin is installed May 29, 2024
@HarleySalas
Copy link
Contributor

How does your import statement look? It was recently changed.

This is what it should look like:

import { nestedDocsPlugin } from '@payloadcms/plugin-nested-docs'

@sriechersrc
Copy link
Author

My Import looks like this import nestedDocs from '@payloadcms/plugin-nested-docs'

However if i change it to the import statement you have provided I'm getting Module '"@payloadcms/plugin-nested-docs"' has no exported member 'nestedDocsPlugin'. Did you mean to use 'import nestedDocsPlugin from "@payloadcms/plugin-nested-docs"' instead?

I have "@payloadcms/plugin-nested-docs": "3.0.0-beta.36" installed

@sriechersrc
Copy link
Author

Nevermind, the TS Server in VSCode silently crashed... import { nestedDocsPlugin } from '@payloadcms/plugin-nested-docs' works like a charm! Thanks!

I am closing the issue

@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label May 29, 2024
Copy link

github-actions bot commented Sep 7, 2024

This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants