📄 Plasmic Support Report — Code Components Not Appearing After Renaming

Hello Plasmic Team,

I need your help diagnosing an issue related to Code Components not appearing in Plasmic Studio after a component rename. I’ll explain exactly what happened, what worked before, what broke after, and the configuration changes made.


:green_circle: What Was Working Originally

Before any renaming, I had two code components working perfectly:

:check_mark: SupabaseUserSession

:check_mark: SupabaseForm

They were correctly detected by the Plasmic Studio interface.
They appeared under Code Components, were draggable, and usable in any page.

The original registration looked like this:

PLASMIC.registerComponent(SupabaseUserSession, {
  name: "SupabaseUserSession",
  props: {},
});

PLASMIC.registerComponent(SupabaseForm, {
  name: "SupabaseForm",
  props: {
    table: "string",
    action: "string",
    payload: "object",
    where: "object",
  },
});

At this stage:

  • Code components synced correctly

  • Studio recognized them

  • They were visible and functional

  • No deployment errors

Everything was stable.


:counterclockwise_arrows_button: What I Changed (and regret doing)

At some point, I tried renaming the components to:

  • CorporativeUserSession

  • CorporativeSupabaseForm

The intention was only organizational, but in hindsight it was unnecessary and caused issues.

After this rename:

  • Plasmic Studio stopped detecting the components

  • Even reverting the names back to the originals did not immediately fix the problem

  • “Sync code components” did not bring them back

  • Even duplicating the whole project did not help consistently

  • The components would randomly appear or disappear depending on sync timing

  • At one point a warning appeared in Studio saying the old component no longer existed

In short:
Changing the registered component name caused the component to become “orphaned,” and Plasmic Studio refused to rediscover it.


:yellow_circle: Necessary Changes for Deployment

TypeScript also required adding missing props, such as the children slot for the form wrapper.
The corrected version became:

PLASMIC.registerComponent(SupabaseForm, {
  name: "SupabaseForm",
  props: {
    children: {
      type: "slot",
      hidePlaceholder: true
    },
    table: "string",
    action: "string",
    payload: "object",
    where: "object",
  },
});

And then the global context:

PLASMIC.registerGlobalContext(SupabaseUserSession, {
  name: "SupabaseUserSession",
  props: {},
});

Now everything builds and deploys correctly.


:red_circle: Current Problem

Even with:

  • Correct names restored

  • Correct props

  • Successful deployments

  • No TypeScript errors

  • Host URL responding correctly

Plasmic Studio intermittently refuses to show the two code components.

They sometimes appear in one project but not in another.
They disappear randomly after a sync.
I can’t consistently reproduce the components in Studio, despite having a clean configuration.

This leads me to believe there may be an internal caching or metadata indexing issue on Plasmic’s side.


:blue_square: Current plasmic-init.ts Code

Here is the clean final version that should work, but Studio still sometimes fails to show the components:

import { initPlasmicLoader } from "@plasmicapp/loader-nextjs";

import SupabaseUserSession from "./components/SupabaseUserSession";
import SupabaseForm from "./components/SupabaseForm";

export const PLASMIC = initPlasmicLoader({
  projects: [
    {
      id: "",
      token: "",
    },
  ],
  preview: false,
});

PLASMIC.registerComponent(SupabaseUserSession, {
  name: "SupabaseUserSession",
  props: {},
});

PLASMIC.registerComponent(SupabaseForm, {
  name: "SupabaseForm",
  props: {
    children: {
      type: "slot",
      hidePlaceholder: true
    },
    table: "string",
    action: "string",
    payload: "object",
    where: "object",
  },
});

PLASMIC.registerGlobalContext(SupabaseUserSession, {
  name: "SupabaseUserSession",
  props: {},
});

(Project ID and token intentionally removed in this report.)


:purple_circle: What I Need From Plasmic Support

  1. Help diagnosing why renamed components become permanently undetectable, even after reverting.

  2. Whether there is an internal cache that must be cleared for Code Components to reappear.

  3. Whether there is a known issue with:

    • component renaming

    • global context components

    • slot-based components

    • multi-project syncing

  4. How to force a complete “metadata re-scan” so Studio reliably picks up code components again.


:folded_hands: Final Note

I fully acknowledge that renaming the component was unnecessary and caused complications.
I regret making that change.
Now I simply want to stabilize things and ensure Plasmic Studio correctly recognizes my Code Components again.

Thank you very much for your help.

Hello @carlos_eduardo

I notice that you have a duplicate name issue in the snippets you shared - your global context and code component are both named SupabaseUserSession. Please ensure all registered assets have unique names.

Hello Plasmic team,

I would like to apologize for the earlier code snippet I sent.
The version I provided in the previous message was incorrect and accidentally showed a duplicated registration of the same component as both a normal component and a global context.

This was NOT the code I am actually using.

Below is the correct and current version of my plasmic-init.ts, exactly as it is deployed.
It has no duplicate registrations, and follows all the recommended patterns:

import { initPlasmicLoader } from "@plasmicapp/loader-nextjs";

import CorporativeUserSession from "./components/CorporativeUserSession";
import CorporativeSupabaseForm from "./components/CorporativeSupabaseForm";

export const PLASMIC = initPlasmicLoader({
  projects: [
    {
      id: "",
      token: "",
    },
  ],
  preview: false,
});

PLASMIC.registerComponent(CorporativeSupabaseForm, {
  name: "CorporativeSupabaseForm",
  props: {
    children: {
      type: "slot",
      hidePlaceholder: true,
    },
    table: "string",
    action: "string",
    payload: "object",
    where: "object",
  },
});

PLASMIC.registerGlobalContext(CorporativeUserSession, {
  name: "CorporativeUserSession",
  props: {},
});

(The IDs and tokens have been removed here for security, but remain unchanged in production.)

This is the exact configuration that is currently deployed and being used.
If there is anything else you need to diagnose the issue, I will gladly provide it.

Thank you again for your help.

Hello @carlos_eduardo

There isn’t a known issue with renaming code components, and I was not able to reproduce this issue with your sample registrations. Are you able to reproduce it in a blank new project configured with your app host? Can you share a screen recording demonstrating the issue?

Re-scan should automatically happen when you reload your project in Studio.