Slicemachine error when trying to run after installing to latest version (0.2.0) using `yarn upgrade -D slice-machine-ui` command
See original GitHub issueVersions
- slice-machine-ui: 0.2.0
- node: 16.13.0
Reproduction
Updating slice-machine-ui
to latest version (0.2.0) via yarn upgrade -D slice-machine-ui
command results in an error when trying to run yarn start-slicemachine
.
Project is using Nuxt/Bridge with Prismic Slicemachines.
Additional Details
Error message:
const frameworkEntry = Object.values(supportedFrameworks).find((f) => deps[f] && deps[f].length); TypeError: Cannot convert undefined or null to object at Function.values (<anonymous>) at detectFramework (/Users/louierichardson/Freelancing/storm-guard/node_modules/@slicemachine/core/build/src/utils/framework.js:32:35) at Object.defineFramework (/Users/louierichardson/Freelancing/storm-guard/node_modules/@slicemachine/core/build/src/utils/framework.js:44:36)
Solution
Go through SliceMachine install process again and run npx @slicemachine/init
. This will install/update the required dependencies in order for new slice-machine-ui
version to work.
Go tho
Steps to reproduce
Run yarn upgrade -D slice-machine-ui
What is expected?
Expected to successfully upgrade Slice Machine to latest version and be able to run slice machines.
What is actually happening?
Displays error as mentioned in additional details.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Top GitHub Comments
We’ve just run into this exact same issue on a react (nextjs) project, but can’t downgrade to 0.1.2 because the popup telling you to upgrade is disruptive and blocks you from making progress and comes back really quickly once clicked.
Chances are that some of slice-machine’s deps have to be updated.
The easiest way I can think of to do this is to remove the node_modules directory and reinstall them so that the most recent version of
@slicemachine/core
is dowloaded.rm -rf node_modules && yarn
Then run
npm ls @slicemachine/core
and v1.1.0 should be installed 😃