Migrating older project to Slice Builder

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

I got a dummy site set up using the new update. Storybook and the Slice Builder 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 Builder running and can get to this page (can't access the main Slice Builder 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 Builder 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 the Slice Builder isn't fully configured to convert older Slice models to the new format needed for the Slice Builder, yet.

The workaround that I had to use here was to use the --create-slice command 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 the builder:

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.