Slice machine is trying to delete all our custom types?

Hello,
I installed slice machine with npx @slicemachine/init and when It's done I noticed that It's trying to delete all our custom types...Why is that? I do not want to wipe a 2 years of works :)

Hello Moe J,

Thanks for reaching out to us.

I need more information from you:

  1. Are you updating to the latest version of Slice Machine in your old repository?
  2. Are these Custom types already deleted? Can you find these Custom Type's in the Prismic legacy Builder?
    What do you mean by this statement? Trying to delete or it's deleted?

Thanks.
Priyanka

Hey Priyanka,

  1. I do not have an old slice machine repository this is my first time setting this up as I need to add slices with variations. Those are the custom types created from the web app.
  2. They're not yet deleted, I can see them in the web app but the local slice machine is "trying" to delete them when I push a new changes. the image in the attachments you saw is the first thing I got after setting up the slice machine locally.

How can keep my old custom types and slices but only use the slice machine for new slices with variations.

Are there any ways to pull shared slices from dashboard to Slicemachine or get shared slices code?

Those are the custom types created from the dashboard.

Those slices don't exist on local , but I can see them in the dashboard but the local slice machine is "trying" to delete them when I push a new changes. the image in the attachments you saw is the first thing I got after setting up the slice machine locally.

That's why I want to pull shared slices from dashboard. When I get slices data (or code) I will be able to push changes proper.

Hi Team,

I reached out to the devs. The response I got is that if you are migrating to Slice Machine, you will need to create files for the legacy Custom Types in the local customtypes folder and paste in your Custom Type JSON.

This will stop these deleted tags from appearing for both the Custom Types and Slices.

Let me know if you have any questions,
Thanks.

1 Like

hi @Phil,

Thanks for your information.
I did what you said and it almost worked.
In addition, I needed to create each shared slice json in slices directory not to show those delete tags.

Thanks.

1 Like

Hello,

I did this a while back, at that moment I created only 1 custom type within slice machine and some slices, and pasted my custom types manually so they wouldn't get deleted.

But in currrent version of slice machine this happens again but now it seems custom type stuff is written in ts.

I want to edit a slice and I'm unable to because pushing changes would erase all my custom types.

Hi Iavn, can you show me which stuff is written in ts?

All custom types should still be in JSON.

I was talking about prismicio-types.d.ts, but I think that is only for slices.

You're right I had to match the format of slice machine but was able to include the ones made in legacy editor too.

1 Like