Ha! Now I've had a chance to test Slice Machine, we'll it's not working for me either.
Nothing uploads to Prismic.
When I press 'Push Slice to Prismic', the UI gets stuck with the loading spinner.
And the terminal outputs these errors:
[slice-machine] {
e: Error: ENOENT: no such file or directory, open '/Users/me/projects/myproject/slices/IntroFour/preview.png'
at Object.openSync (fs.js:462:3)
at Object.readFileSync (fs.js:364:35)
at Object.base64Sync (/Users/me/projects/myproject/node_modules/base64-img/base64-img.js:60:17)
at _callee2$ (/Users/me/projects/myproject/node_modules/slice-machine-ui/server/api/push.js:46:34)
at tryCatch (/Users/me/projects/myproject/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/Users/me/projects/myproject/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/Users/me/projects/myproject/node_modules/regenerator-runtime/runtime.js:118:21)
at asyncGeneratorStep (/Users/me/projects/myproject/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/Users/me/projects/myproject/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at runMicrotasks (<anonymous>) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/me/projects/myproject/slices/IntroFour/preview.png'
}
}
[slice-machine] (node:76555) UnhandledPromiseRejectionWarning: RangeError [ERR_HTTP_INVALID_STATUS_CODE]: Invalid status code: undefined
at ServerResponse.writeHead (_http_server.js:248:11)
at ServerResponse._implicitHeader (_http_server.js:239:8)
at write_ (_http_outgoing.js:642:9)
at ServerResponse.end (_http_outgoing.js:753:5)
at ServerResponse.send (/Users/me/projects/myproject/node_modules/express/lib/response.js:221:10)
at ServerResponse.json (/Users/me/projects/myproject/node_modules/express/lib/response.js:267:15)
at _callee6$ (/Users/me/projects/myproject/node_modules/slice-machine-ui/server/api/index.js:52:39)
at tryCatch (/Users/me/projects/myproject/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/Users/me/projects/myproject/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/Users/me/projects/myproject/node_modules/regenerator-runtime/runtime.js:118:21)
(node:76555) 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: 21)