-
Notifications
You must be signed in to change notification settings - Fork 2.4k
TypeError: Unknown file extension ".css" for @payloadcms/richtext-lexical/dist/exports/react/components/RichText/index.css #10797
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please add a reproduction in order for us to be able to investigate. Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided. Why was this issue marked with the
|
I'm converting Lexical ---> JSX, when I use the the RichText component from the plugin
and try to generate types automatically I get the same error as @haydnjonesdesign: Interestingly enough, when I replicate my code in the CMS Website template of Payload, types are being generated fine. In my own project type generation breaks. There is definitely something about configuration of Lexical. This is how the file
Thank you! |
I’m facing a similar issue. I used a website template for my project, which worked initially. After removing some code, I ran into a slightly different problem. TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".css" for /xxxx/xxxxx/xxx/node_modules/.pnpm/[email protected][email protected]/node_modules/react-image-crop/dist/ReactCrop.css |
I'm also facing the same issue while generating import maps |
same issue |
same issue here |
I had the same type error issue as @yerled. I found that I was wrongly importing and using my custom react component as a field object instead of the SelectField config object I had created of the same name. For example,
|
Exactly the same problem as @yerled |
Okay just found out the reason for my issue based on @sdelpercio 's answer. I was importing a custom component like this:
Instead of like this:
|
Describe the Bug
Hey
I'm just looking at PayloadCMS for a project and run into an issue near instantly... When adding a RichText component to the frontend of a blank payload install results in the following error.
Browser error
Terminal error
Link to the code that reproduces this issue
https://github.com/haydnjonesdesign/payloadcms
Reproduction Steps
npx create-payload-app@latest -t blank
Install lexical
npm install @payloadcms/richtext-lexical
Add lexical to post schema
Create page and add RichText component
Received warning that @payloadcms/richtext-lexical/react required version 3.18.0.
Removed and downgraded
rm -r node_modules && npm install @payloadcms/[email protected]
Create a new post in admin. Add a heading, set slug to /test-richtext and add some text to Lexical.
Load page in browser
http://localhost:3000/test-richtext
Read Payload requires matched versions so downgraded Payload to 3.18.0
Reloaded page, resulting in the same error.
Which area(s) are affected? (Select all that apply)
plugin: richtext-lexical
Environment Info
The text was updated successfully, but these errors were encountered: