# Slice Error with basic slice in Nuxt 2

**URL:** <https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360>\
**Category:** Developing with Prismic\
**Tags:** nuxtjs\
**Created:** [February 6, 2023, 6:04pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360 "2023-02-06T18:04:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![studiotreble](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/studiotreble/32/4356_2.png) [@studiotreble](https://community.prismic.io/u/studiotreble)\
**Post date:** [February 6, 2023, 6:04pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360/1 "2023-02-06T18:04:36Z")

</div>

Hi,

I'm using Nuxt 2 with Slicemachine 0.6.1 and I'm trying to create a slice as I usually do, and adding the simplest slice with the default title and description fields creates the component in the `slices` library folder as expected. However, the slicezone component just outputs "Could not find a component for Slice type "text\_block"

I've tried multiple times, including completely resetting my slices by deleting them all in my local repo as well as within Prismic using the Custom Type API, but this just happens every time I try adding a new slice in Slice Machine.

The Slice Simulator doesn't render anything either.

How can I troubleshoot this?

Thanks

---

<div class="post-metadata">

**Author:** ![jake](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jake/32/5120_2.png) [@jake](https://community.prismic.io/u/jake)\
**Post date:** [February 6, 2023, 6:11pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360/2 "2023-02-06T18:11:09Z")

</div>

Hey,

Do you have any other slices in the project that work?

What does your index.js file look like in `/slices/`?

---

<div class="post-metadata">

**Author:** ![studiotreble](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/studiotreble/32/4356_2.png) [@studiotreble](https://community.prismic.io/u/studiotreble)\
**Post date:** [February 6, 2023, 6:23pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360/3 "2023-02-06T18:23:10Z")

</div>

Hi Jake,

No - I had a few but none of them worked, so I removed them all and started again, adding the simplest one using Slice Machine's default fields Title and Description.

My `/slices/index.js` is as follows:

```auto
// Code generated by Slice Machine. DO NOT EDIT.

import TextBlock from './TextBlock';

export {
	TextBlock,
};

export const components = {
	text_block: TextBlock,
};
```

---

<div class="post-metadata">

**Author:** ![jake](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jake/32/5120_2.png) [@jake](https://community.prismic.io/u/jake)\
**Post date:** [February 6, 2023, 6:46pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360/4 "2023-02-06T18:46:58Z")

</div>

Ok thanks,

What does your `<SliceZone>` component look like in pages?

If you've setup a new project and are using the latest `prismicio-vue` package you'll need to pass your components to your SliceZone now like:

```auto
<SliceZone :slices="content.data.slices" :components="slices" />
...
import { slices } from '~/slices'

```

Let me know if this helps, if not would you mind sharing a reproducible copy of your repo?

---

<div class="post-metadata">

**Author:** ![studiotreble](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/studiotreble/32/4356_2.png) [@studiotreble](https://community.prismic.io/u/studiotreble)\
**Post date:** [February 6, 2023, 6:52pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360/5 "2023-02-06T18:52:54Z")

</div>

Oh - I've just realised I was missing the import of the SliceZone component 😀

Thanks for your swift replies, and sorry for the inconvenience!

---

<div class="post-metadata">

**Author:** ![jake](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/jake/32/5120_2.png) [@jake](https://community.prismic.io/u/jake)\
**Post date:** [February 6, 2023, 6:53pm UTC](https://community.prismic.io/t/slice-error-with-basic-slice-in-nuxt-2/12360/6 "2023-02-06T18:53:39Z")

</div>

No problem at all, glad you solved it! 😁
