payloadcms / payload

Payload is the open-source, fullstack Next.js framework, giving you instant backend superpowers. Get a full TypeScript backend and admin panel instantly. Use Payload as a headless CMS or for building powerful applications.
https://payloadcms.com
MIT License
24.35k stars 1.54k forks source link

Polyfill error in imageKit plugin setup #1265

Closed shubhamkashyapdev closed 2 years ago

shubhamkashyapdev commented 2 years ago

Bug Report

imagekit_polyfill_error

Getting polyfill error in imageKit plugin setup

Current Behavior

Polyfill error

Expected Behavior

Image should be uploaded to imageKit

Possible Solution

Not sure

Steps to Reproduce

  1. install he payload imagekit plugin: npm i payloadcms-plugin-imagekit
  2. It was giving an error that imageKit module not found so i installed that: npm i imagekit
  3. add the confiig as instructed on plugin's github repo: https://github.com/novanda1/payload-imagekit
  4. After saving got polyfill error in console

Payload version: 1.1.15 imageKit version: 4.1.1 payloadcms-plugin-imagekit version: 0.2.3

Github Link: https://github.com/shubhamwebdesign/devstack_project_crm/tree/imagekit

jmikrut commented 2 years ago

Hey @shubhamwebdesign — this is an issue with that plugin and not with Payload. It appears that there is a Node package being imported which is not compatible with browsers, and should be removed using Webpack aliases as seen in the docs here.

You should re-open this issue and link to the above docs on that repo itself!

shubhamkashyapdev commented 2 years ago

Opened the issue on the plugin repo - thanks @jmikrut for the quick response

github-actions[bot] commented 1 month ago

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