Slice Builder generating error when attempting to run Migration to Prismic (Cannot read property 'libraries' of undefined)

Error is occuring on http://localhost:9999/migration.
7 Slices are found (and they are listed).

When I click 'Push update to Prismic', nothing happens and the console outputs error below.

What next?

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

[slice-machine] (node:88160) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'libraries' of undefined
    at _callee$ (/Users/me/projects/braveenergysystems/node_modules/slice-machine-ui/server/api/libraries.js:16:55)
    at tryCatch (/Users/me/projects/braveenergysystems/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/Users/me/projects/braveenergysystems/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.next (/Users/me/projects/braveenergysystems/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at /Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
    at getLibrairies (/Users/me/projects/braveenergysystems/node_modules/slice-machine-ui/server/api/libraries.js:15:27)
(node:88160) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 42)

[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...
(node:88160) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'libraries' of undefined
    at _callee$ (/Users/me/projects/braveenergysystems/node_modules/slice-machine-ui/server/api/libraries.js:16:55)
    at tryCatch (/Users/me/projects/braveenergysystems/node_modules/regenerator-runtime/runtime.js:63:40)
    at Generator.invoke [as _invoke] (/Users/me/projects/braveenergysystems/node_modules/regenerator-runtime/runtime.js:293:22)
    at Generator.next (/Users/me/projects/braveenergysystems/node_modules/regenerator-runtime/runtime.js:118:21)
    at asyncGeneratorStep (/Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
    at _next (/Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
    at /Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at /Users/me/projects/braveenergysystems/node_modules/@babel/runtime/helpers/asyncToGenerator.js:21:12
    at getLibrairies (/Users/richiekhoo/projects/braveenergysystems/node_modules/slice-machine-ui/server/api/libraries.js:15:27)
(node:88160) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 44)

Hey!

Could you help me detailing the steps you took to found the error?
First checks we can do are:

  • Are you using version 3.8.3-beta.0 of the CLI? check this by running
    prismic --version

  • Slicemachine is already connected to your project and, before running the --develop command you created a new slice with the --create-slice command and Installed and added a Storybook, is this correct?

  • Could you try and login in and out of Prismic prismic logout and prismig login? sometimes an authentication issue gets in the way.

  • Try deleting your node_modules and re installing

All additional details of your configuration will be helpful.

Since we're still in the beta version of the Slice Builder, we don't have most the use cases documented yet. So it'll be good to troubleshoot this together!

Also, is this issue related to this other comment you added in another thread?


If it is, we can merge the convos together to make it easier for everyone!

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