Skip to content
Discussion options

You must be logged in to vote

Hey @lynndylanhurley — this is actually because the Webpack plugin you're using relies on some Node-only modules. But - - the Payload config is executed in both Node and in your browser, which is where all of these errors are coming from. You need to use a Webpack alias to tell Webpack to ignore that package for its browser JS, which will allow you to circumvent this issue.

See more in our docs here:
https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules

I will convert this to a discussion but am happy to continue to help!

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@lynndylanhurley
Comment options

@lynndylanhurley
Comment options

Answer selected by zubricks
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
3 participants
Converted from issue

This discussion was converted from issue #2187 on February 27, 2023 16:53.