Migrating older Slice Machine project to Slice Machine update

Hello, I was hoping you could help me through another issue.

I got a dummy site set up using the new update. Storybook and Slice Machine work great on it and our team is looking forward to using these features.

However, on our main site, I've tried to integrate these features and have run into some issues with pushing slices to Prismic. I've gotten both Storybook and Slice Machine running and can get to this page (can't access the main Slice Machine page):

When I click the "Push update to Prismic" button at the bottom, I get an error that starts with:

[slice-machine] [api/slices] An error occured while fetching slices. Note that when stable, this should break!

[slice-machine] Could not fetch remote slices. Continuing...

[slice-machine] (node:8296) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'libraries' of undefined

I can't proceed from this point. I've been following this page. I'm signed into Prismic on the command line and I have the right version of Prismic installed. The 17 slices listed in the above image were made before the Slice Machine update was released, so I'm not sure if that has anything to do with it. They're already all up on the Prismic website, but apparently Slice Machine wants to (but can't) push them again... Unless I'm understanding this wrong.

Any help would be appreciated.

Hi Brett,

I'm migrating an older project and also getting the same errors, so once I know more about how to resolve the issue I'll get back to you.


Hey @bmeyer,

So it seems Slice Machine isn't fully configured to convert older Slice models to the new format needed for Slice Machine, yet.

The workaround that I had to use here was to use the + Create Slice button in the builder to create new Slice that would be configured correctly and build the Slices in the builder and migrate and code from my components in to the new structure. I know this is a real pain especially when you have 17 Slices/components like yourself.

The team is working hard so that this process will be automatic with the above screen in the future, but for now this the only way.

Sorry for the inconvenience and I will check if there is an easier way.


Actually @bmeyer the team has already worked on this. Can you try updating Slice Machine:

npm install slice-machine-ui

You'll again be greeted by this screen, but this time is should update your models for you. Let us know if this works.


This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Hi there,

Based on @Phil response in this thread.

Am I correct in saying you can migrate your legacy slices via the slice machine UI tool now, then?

Are there any issues to be aware of where a slice may break in production? Or will the new data structure only occur in a new release?

I've been using slice machine with a new project and see that GraphQL and GraphQuery now support content relationships which is good.

Hi Duncan,

This is an old thread at this stage and was in relation to a Slice Machine update, rather than legacy Slices.

For the moment, this still isn't possible. It's on the team's radar but there are still a few things to deal with before we can build a legacy migration tool.

There are no issues in terms of Slice's breaking in production and Slice Machine is out of beta now so it is considered stable.

I'm glad you're enjoying working with Slice Machine, the next thing on our radar is mocks for these content relationships.

Let me know if you have any other questions.