Index.ts in a Slices folder error after deleting a slice in Slice Machine

I did some clean-up by deleting a slice in Slice Machine, but it looks index.ts in a Slices folder didn't recognize it, as you see in the screenshots below.

I ran git reset --hard to start over and delete them again, but it didn't solve this error. I worry if there will be more problems if I continue working.

Thank you in advance!

Screenshot 2024-02-09 at 10.46.00 AM

Oy! You keep "stepping in it," eh?

It looks like VS code is showing you that the three slices (footer_navigation, heading_slice, parent_nav) are being deleted. Removing them from the index.ts in your Slices folder should remove them from your available slices.

Yep, I will be around here until this project is done :slight_smile:
I am new to Prismic and still can't wrap my head around it.

As you can see from a screenshot, those three slice folders were already deleted.

Once I found it, I knew I was "in the right place." It's actually the first reason I found to leave Gatsby behind. I now have other reasons too.

I love the slicemachine.

Forgive me, I'm failing to see exactly what the "problem" is that you're having. Can you help me understand better? I can be :turtle: speed sometimes.

Same, I used Gatsby before.

I will try my best to explain.

  1. I created a Layout slice.

  2. I deleted footer_navigation, heading_slice, parent_nav, sub_menu_item, sub_nav

  3. This error occurs in slices/index.ts

What error specifically are you seeing?

Is the error in the terminal? Is it in the browser?

When you delete a slice in slicemachine, it's supposed to remove the folders and then also the code from that index.ts that corresponds with the slice(s).

I am guessing this is a TypeScript error because there is an error on the slices/index.ts file that complains about those slices that got deleted. Please see the first screenshot.

I am sorry that I couldn't explain it any better.

Sometimes I get TS errors that go away when I close and restart VS code. :person_shrugging:

You're right! The red is still in slices/index.ts but at least the slice folder isn't red anymore.

Thank you again! I will be posting more questions (I wish Prismic made more videos.)