question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Versions

  • 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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
danspratlingcommented, Jan 26, 2022

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.

1reaction
MarcMcIntoshcommented, Feb 1, 2022

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 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error after updating Slicemachine [Yarn] - Prismic People
We saw an issue like that with the yarn upgrade command, where yarn is updating the slice-machine-ui package but not the dependencies. You...
Read more >
Issues - GitHub
Storybook returns an error and I can not build my content model/continue to work with slice machine · Whendebugging I have created (and...
Read more >
slice-machine-ui - npm
A visual builder for your Slice Models with all the tools you need to generate data models and mock CMS content locally.. Latest...
Read more >
Build a Netlify Clone with Next.js, Tailwind CSS, and Prismic ...
Netlify's homepage is very tricky to build, but let's give it a shot. We'll use Next.js, Tailwind CSS, and Prismic Slice Machine.
Read more >
Creating a Project With Slice Machine & Next.js - YouTube
Today Alex is presenting how to set up Slice Machine with Next.js in order to start developing slices - website sections - with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found