I’m having an issue with code layers. As soon as I create one, it shows this error indicator, but I don’t see any actual error message. How can I fix this? I’m working on a project and this is a major problem for me.
Hey, @Tommaso Pizzonia 👋 Thanks for your post. I like to get us more details to work with.
A helpful test:
Create a brand-new code layer with something minimal as a control (e.g. a plain `<div>Hello</div>`) and see if the error indicator still appears
A few quick questions:
Where is this happening — Figma Sites, or somewhere else?
Is the code in the layer something you wrote yourself, or was it generated (e.g. via Figma Make)? If generated, have you tried it with your own simple code too?
Does the indicator appear even on an empty or newly-created layer, before you add any code?
If you can also paste the exact code that's in the layer with an error (or confirm it's empty), that'll let us reproduce it on our end. Thanks!— Jaycee
This is happening in Figma's code layer environment
The code inside the layers was originally generated by Figma Make and then modified with AI.
Yes, the error indicator appears even on a brand-new, empty code layer, before adding any code. However, nothing shows up in the console — it stays clean, so there's no error message I can point to.
So the indicator seems to be there regardless of the content of the layer. Happy to share any specific layer's code if that helps you reproduce it, but the empty-layer case might be the clearest test since it rules out the code itself.
Let me know what else would be useful. Thanks! Tommaso
Hey hey @Tommaso Pizzonia 👋 You are very welcome! Happy to help any time.
And @jamieskii we’ll need more info:
A helpful test:
Create a brand-new code layer with something minimal as a control (e.g. a plain `<div>Hello</div>`) and see if the error indicator still appears
A few quick questions:
Where is this happening — Figma Sites, or somewhere else?
Is the code in the layer something you wrote yourself, or was it generated (e.g. via Figma Make)? If generated, have you tried it with your own simple code too?
Does the indicator appear even on an empty or newly-created layer, before you add any code?
If you can also paste the exact code that's in the layer with an error (or confirm it's empty), that'll let us reproduce it on our end. Thanks!— Jaycee
It’s also happening with a new code layer and a simple code as <div>Hello</div>
It’s happening on Figma Sites.
It was generating by figma make, but i also tried other code and i get the same error message. When i add it to my canvas i get a box with a red stroke and an exclamation point in the middle. It always appears whether or not it’s in an empty layer or the layer i want it on.
this is the code i want to use:
import { useState } from "react"; import { ChevronDown } from "lucide-react";
export default function Layer() { const [isOpen, setIsOpen] = useState(false); const [selected, setSelected] = useState("Selecteer een optie");
Hey, @jamieskii 👋 Thanks for the follow up. I grabbed your code and opened a new file. In this case, it worked without issue.
I am wondering if there is something local to your network or machine that is causing a conflict with the code layer working as expected. If it is persisting, I can help with opening a support ticket for your specific problem. Talk soon — Jaycee