You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
I'm trying to use the cloud storage plugin. Unfortunately I can't because when I try to use the admin panel I get this: Module not found: Can't resolve 'fs'
It's trying to load the cloudStorage plugin's dependencies. Especially 'fs'. I read https://payloadcms.com/docs/admin/webpack for webpack. But I'm using Next.js, the integration should be flawless I guess. How to fix this?
Also I'm using Zod to parse the .env variables for some config values for the plugin and also for generating types. Since the config is ran on both the server and the client Zod is erroring out because it can't read the env vars. I had to import dotenv to make the generation of types' script work, but can't do anything when it's trying to load the code in the admin panel.
The text was updated successfully, but these errors were encountered:
Can you check that and make sure that you are properly initializing the cloud storage plugin?
TL;DR: the plugin is responsible itself for adjusting your Webpack config, but if you don't actually initialize it at all, it won't adjust your Webpack config at all. You need to make sure that it is indeed executing otherwise you will see dependency issues like what you've reported.
I will close this but I am happy to help further - so just let me know if you can't get it to work. Might need to have you share your Payload config for further help though. 👍
I'm using this plugin and it seems to be working, but when I query a media item the url is /media/image_file_name.png and there is no route handler for that so the image won't load. How can I get this to work?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to use the cloud storage plugin. Unfortunately I can't because when I try to use the admin panel I get this:
Module not found: Can't resolve 'fs'
It's trying to load the cloudStorage plugin's dependencies. Especially 'fs'. I read
https://payloadcms.com/docs/admin/webpack
for webpack. But I'm using Next.js, the integration should be flawless I guess. How to fix this?Also I'm using Zod to parse the
.env
variables for some config values for the plugin and also for generating types. Since the config is ran on both the server and the client Zod is erroring out because it can't read the env vars. I had to import dotenv to make the generation of types' script work, but can't do anything when it's trying to load the code in the admin panel.The text was updated successfully, but these errors were encountered: