Slice live preview give me error

Hello,

I'm encountering an issue with the live preview feature in a Next.js TypeScript project. As shown in a screenshot, I have verified that my live preview settings are correctly configured with the appropriate URL.

Additionally, I have a self-generated slicemachine.config.json file with the following content:

{
  "libraries": ["./src/slices"],
  "adapter": "@slicemachine/adapter-next",
  "repositoryName": "alainbphoto",
  "localSliceSimulatorURL": "http://localhost:3000/slice-simulator"
}

However, I'm observing an error in the console indicating a problem with parsing the slicemachine.config.json file:

[next]  ⨯ ./slicemachine.config.json
[next] Module parse failed: Cannot parse JSON: Expected double-quoted property name in JSON at position 190 while parsing '{
[next]   "libraries": [
[next]     "./src/slices"
[next]   '
[next] You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
[next] Error: Cannot parse JSON: Expected double-quoted property name in JSON at position 190 while parsing '{
[next]   "libraries": [
[next]     "./src/slices"
[next]   '
[next] Import trace for requested module:
[next] ./slicemachine.config.json
[next] ./src/prismicio.ts
[next] ./src/app/[uid]/page.tsx

If you need more info, feel free to ask me.
Thank you in advance for your assistance and time.

Hi @bassalair.quentin ,

Welcome to the community :slight_smile:

Is your slices file still at this location within your project?

Hello @Phil. Thank you

I have the slices folder here, but not a slices file.

Your Slice files need to be here for the preview to work.

This is strange, because I follow the tuto from youtube :

and I have the same files structure. this is my repo : GitHub - Neudo/prismic_photo_blog

Thank you for your answer.

Ah ok, so you do have Slice files. I'll keep investigating.