Skip to content

Problem using library 'basic-ftp' #218

Answered by jmikrut
aljubaer asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @aljubaer

This is actually a common problem that has to do with importing non browser-friendly code into browser apps. As the Payload config is shared between the server and the browser, installing server-only modules like basic-ftp will allow the server to work fine, but cause the browser bundle to break.

But - fixing it is easy! See here in the docs:
https://payloadcms.com/docs/admin/webpack#aliasing-server-only-modules

Also, I've written up a bit longer of a response to this type of issue in another discussion here:
#205

Does this help?

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@aljubaer
Comment options

Answer selected by aljubaer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants