Having issues pushing slices to Prismic and cant resolve it. Is there any other way than to delete and remake the repo. Ive run into this a couple of times, and since I only had lik 2 slices i resolved it by creating a new repo. But Im getting to a point where its too much work to remake it every time.
I have no errors in storybook what so ever so have to do with the repo (can save slice to file system).
Theres no info more than "An unexpected error occurred while trying to push the slice to Prismic".
Tried to look in the network panel, not that much more info there. Any ideas?
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)
Yes I think this is to do with the authentication for the Slices API. You would need to prismic logout then prismic login to get the token necessary to be able to push your Slices.
@online Can you show me the file structure for the folder of one of your Slices. Are these newly created slices or ones created before Slice Machine was released?