@samlittlefair I've updated to the new alpha. I can see the updated version in my package.json file:
"name": "my-slicemachine-project",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"slicemachine": "start-slicemachine --port 9999",
"storybook": "start-storybook -p 8888",
"build-storybook": "build-storybook"
},
"dependencies": {
"@emotion/core": "^10.0.5",
"essential-slices": "0.0.11",
"next": "10.0.2",
"next-slicezone": "0.0.10",
"next-transpile-modules": "^4.1.0",
"prismic-javascript": "^3.0.2",
"prismic-reactjs": "^1.3.3",
"react": "17.0.1",
"react-dom": "17.0.1"
},
"devDependencies": {
"@storybook/react": "^5.3.19",
"babel-loader": "^8.2.1",
"babel-plugin-react-require": "^3.1.3",
"slice-machine-ui": "0.0.40-alpha.1"
}
}
Seeing different errors now when I try to push slice to prismic:
> my-slicemachine-project@0.1.0 slicemachine /Users/nikibrown/Code/my-slicemachine-project
> start-slicemachine --port 9999
[slice-machine] Launching server
[slice-machine] Now running on http://localhost:9999 !
[slice-machine] [api/slices] An error occured while fetching slices. Note that when stable, this should break!
[slice-machine] {
e: Error: ENOENT: no such file or directory, open '/Users/nikibrown/Code/my-slicemachine-project/slices/SimpleHtml/preview.png'
at Object.openSync (fs.js:458:3)
at Object.readFileSync (fs.js:360:35)
at Object.base64Sync (/Users/nikibrown/Code/my-slicemachine-project/node_modules/base64-img/base64-img.js:60:17)
at _callee2$ (/Users/nikibrown/Code/my-slicemachine-project/node_modules/slice-machine-ui/server/api/push.js:46:34)
at tryCatch (/Users/nikibrown/Code/my-slicemachine-project/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/Users/nikibrown/Code/my-slicemachine-project/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/Users/nikibrown/Code/my-slicemachine-project/node_modules/regenerator-runtime/runtime.js:118:21)
at asyncGeneratorStep (/Users/nikibrown/Code/my-slicemachine-project/node_modules/slice-machine-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:24)
at _next (/Users/nikibrown/Code/my-slicemachine-project/node_modules/slice-machine-ui/node_modules/@babel/runtime/helpers/asyncToGenerator.js:25:9)
at processTicksAndRejections (internal/process/task_queues.js:97:5) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: '/Users/nikibrown/Code/my-slicemachine-project/slices/SimpleHtml/preview.png'
}
}
[slice-machine] (node:19972) 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/nikibrown/Code/my-slicemachine-project/node_modules/express/lib/response.js:221:10)
at ServerResponse.json (/Users/nikibrown/Code/my-slicemachine-project/node_modules/express/lib/response.js:267:15)
at _callee6$ (/Users/nikibrown/Code/my-slicemachine-project/node_modules/slice-machine-ui/server/api/index.js:55:39)
at tryCatch (/Users/nikibrown/Code/my-slicemachine-project/node_modules/regenerator-runtime/runtime.js:63:40)
at Generator.invoke [as _invoke] (/Users/nikibrown/Code/my-slicemachine-project/node_modules/regenerator-runtime/runtime.js:293:22)
at Generator.next (/Users/nikibrown/Code/my-slicemachine-project/node_modules/regenerator-runtime/runtime.js:118:21)
(node:19972) 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: 3)
[slice-machine] (node:19972) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.```
When I try to edit my slices and add new fields I see this error:
`Could not connect to Storybook. Make sure Storybook is running and its url is set in SliceMachine configuration.` Story book is definitely running when I click on "Open in Storybook"