Not exactly sure what is going on with this but my project just crapped the bed with webpack errors. I installed the Facebook API npm package, but I don't think that is the cause.
"Webpack 5 no longer polyfills Node.js core modules automatically which means if you use them in your code running in browsers or alike, you will have to install compatible modules from npm and include them yourself. Here is a list of polyfills webpack has used before webpack 5:"
Anyone else running in to this?
Hey @joelcorey, you might be using server-only modules, which Webpack is trying to bundle and is running into this error when trying to use them in the browser. Are you using any plugins or running any hooks that might be causing this?
more on Webpack in Payload here:https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules
@tylandavis I do believe that this will solve it. I will go ahead and mark this one as answered. Thank you for your help.
Glad I could help! Let me know if you run into other issues with this and I’d be happy to help.