# Error after updating Slicemachine \[Yarn\]

**URL:** <https://community.prismic.io/t/error-after-updating-slicemachine-yarn/9432>\
**Category:** Developing with Prismic\
**Tags:** slice-machine\
**Created:** [March 20, 2022, 9:01pm UTC](https://community.prismic.io/t/error-after-updating-slicemachine-yarn/9432 "2022-03-20T21:01:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![erich.haemmerle](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@erich.haemmerle](https://community.prismic.io/u/erich.haemmerle)\
**Post date:** [March 20, 2022, 9:01pm UTC](https://community.prismic.io/t/error-after-updating-slicemachine-yarn/9432/1 "2022-03-20T21:01:43Z")

</div>

I am using the following repo which came from a YouTube tutorial and is using the Next.js starter kit. [https://github.com/skyward-digital/next-starter-prismic](https://github.com/skyward-digital/next-starter-prismic) I had everything working correctly according to the tutorial and was able to create slices and push to Prismic and my local Next.js site worked great. So Slicemachine started barking at me to update. I got a constant nag screen to update Slicemachine with a copy and paste command of "yarn upgrade -D slice-machine-ui" which I did. But after doing so, when I try to run "yarn run slicemachine", I immediately get an error:

```auto
yarn run v1.22.17
$ start-slicemachine --port 9999
node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:371:5)
    at validateString (node:internal/validators:119:11)
    at Object.join (node:path:1172:7)
    at JsonPackagePath (/Users/ehaemmerle/Sites/sandbox/next-starter-prismic/node_modules/slice-machine-ui/node_modules/@slicemachine/core/build/src/filesystem/paths.js:73:49)
    at retrieveJsonPackage (/Users/ehaemmerle/Sites/sandbox/next-starter-prismic/node_modules/slice-machine-ui/node_modules/@slicemachine/core/build/src/filesystem/pkg.js:7:49)
    at Object.defineFramework (/Users/ehaemmerle/Sites/sandbox/next-starter-prismic/node_modules/slice-machine-ui/node_modules/@slicemachine/core/build/src/utils/framework.js:35:54)
    at run (/Users/ehaemmerle/Sites/sandbox/next-starter-prismic/node_modules/slice-machine-ui/start/index.js:162:37)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_INVALID_ARG_TYPE'

```

I tried deleting my node\_modules directory and doing "yarn install" but that didn't work. I still get the error when trying to run slicemachine. I'm not sure what is causing this. The YouTube tutorial I followed is here: [https://www.youtube.com/watch?v=-c0okRzJJXQ](https://www.youtube.com/watch?v=-c0okRzJJXQ)

---

<div class="post-metadata">

**Author:** ![Phil](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/phil/32/14_2.png) [@Phil](https://community.prismic.io/u/Phil)\
**Post date:** [March 21, 2022, 4:29pm UTC](https://community.prismic.io/t/error-after-updating-slicemachine-yarn/9432/2 "2022-03-21T16:29:50Z")

</div>

Hi Erich,

Welcome to the community!

I'm sorry to see you're having this issue. 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 can solve his issue by using `yarn add slice-machine-ui@latest`.

Thanks.

---

<div class="post-metadata">

**Author:** ![erich.haemmerle](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@erich.haemmerle](https://community.prismic.io/u/erich.haemmerle)\
**Post date:** [March 23, 2022, 3:40pm UTC](https://community.prismic.io/t/error-after-updating-slicemachine-yarn/9432/4 "2022-03-23T15:40:28Z")

</div>

Awesome thanks. That worked!

---

<div class="post-metadata">

**Author:** ![john.ennew](https://dub1.discourse-cdn.com/flex013/user_avatar/community.prismic.io/john.ennew/32/5019_2.png) [@john.ennew](https://community.prismic.io/u/john.ennew)\
**Post date:** [September 18, 2022, 5:54pm UTC](https://community.prismic.io/t/error-after-updating-slicemachine-yarn/9432/6 "2022-09-18T17:54:48Z")

</div>

I just updated to 0.4.2 and got the error below when running `yarn slicemachine`. This was also fixed by running `yarn add slice-machine-ui@latest`. Just including this knowledge here!

```auto
/node_modules/slice-machine-ui/build/lib/env/resolveAliases.js:11
    const pkg = core_1.FileSystem.retrieveJsonPackage(cwd).content;
                                  ^

TypeError: Cannot read properties of undefined (reading 'retrieveJsonPackage')

```
