# Absolute screenshotPaths generate in .slicemachine/libraries-states.json

**URL:** <https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899>\
**Category:** Developing with Prismic\
**Created:** [February 2, 2022, 4:52pm UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899 "2022-02-02T16:52:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrian.marte](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@adrian.marte](https://community.prismic.io/u/adrian.marte)\
**Post date:** [February 2, 2022, 4:52pm UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899/1 "2022-02-02T16:52:15Z")

</div>

Hi,

the paths to the screenshots for the slices are referenced in `.slicemachine/libraries.-states.json`, but slicemachine uses absolute paths in the JSON.

e.g.:

```auto
"screenshotPaths": {
  "default-slice": {
    "path": "/Users/xxx/yyy/src/slices/CallToAction/default-slice/preview.png",
    "width": 300,
    "height": 50
  }
}

```

This is problematic for us, as we commit this directory and of course not all of our developers share the same root filesystem 🙂

Is there any configuration option to use relative paths?

Thanks in advance for any hints!

Best regards,  
Adrian

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [February 3, 2022, 4:22am UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899/3 "2022-02-03T04:22:15Z")

</div>

Hello @adrian.marte

Thanks for reaching out to us.

I am not sure if we can configure a relative path instead of an absolute one. I have passed this query to my SM team. I will let you know once I get a response from them.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![Priyanka](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/priyanka/32/3223_2.png) [@Priyanka](https://community.prismic.io/u/Priyanka)\
**Post date:** [February 4, 2022, 8:54am UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899/4 "2022-02-04T08:54:04Z")

</div>

Hello @adrian.marte

I have received an update from the SM team and we added it to the backlog, but I don't have an ETA.

Thanks,  
Priyanka

---

<div class="post-metadata">

**Author:** ![webadmin](https://avatars.discourse-cdn.com/v4/letter/w/90db22/32.png) [@webadmin](https://community.prismic.io/u/webadmin)\
**Post date:** [June 20, 2022, 3:50pm UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899/7 "2022-06-20T15:50:47Z")

</div>

Also getting this issue, always in conflict with every merge.

Resorting to .gitignore the file.

---

<div class="post-metadata">

**Author:** ![Pau](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/pau/32/5422_2.png) [@Pau](https://community.prismic.io/u/Pau)\
**Post date:** [June 21, 2022, 10:52am UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899/8 "2022-06-21T10:52:09Z")

</div>

Hey @webadmin, thanks for sharing your case.  
That's the current workaround that we can recommend since we're not modifying the structure of Slice Machine projects yet.

---

<div class="post-metadata">

**Author:** ![frank.stallone](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/frank.stallone/32/4834_2.png) [@frank.stallone](https://community.prismic.io/u/frank.stallone)\
**Post date:** [December 6, 2022, 6:44pm UTC](https://community.prismic.io/t/absolute-screenshotpaths-generate-in-slicemachine-libraries-states-json/8899/11 "2022-12-06T18:44:03Z")

</div>

Just an FYI — It's a damned if you do, damned if you don't situation to add this file to `.gitignore`. On one hand, it get's it out of the merge conflict zone. Getting it into `.prettierignore` helps prettier checks on it to. The flip side is we have TypeScript set to check that `import`'s resolve in our CI — but our CI never has the file because it never runs `yarn slicemachine`. So, we get CI errors like `[app]/pages/slice-simulator.tsx(4,19): error TS2307: Cannot find module '../.slicemachine/libraries-state.json' or its corresponding type declarations.`
