### Versions
- slice-machine-ui: 1.5.1
- node: v16.20.0 and v18.16.1
### …Reproduction
1. npm install
2. npm run dev
3. Open localhost:9999/slices and then proceed to create Slice
4. Shown "Internal Error: Slice not created". Checked on Dev Tools, console, etc no further error information
5. Select one of the previously created Slice. Update few field
6. Click "Save to File System", got error "Error in `@slicemachine/adapter-next` during `slice:update` hook: Cannot read properties of undefined (reading 'startsWith')"
<details open>
<summary>Additional Details</summary>
Last changes made before got the error was updating `@prismic/next` from `0.1.2` to `1.3.3` since my project also updated to Next.js 13. After that, tried downgrade `@prismic/next` back to `0.1.2` also still got the error.
Tried to exactly match the version used in the given crash course , also still got the error. Tried to do clean install, delete .next and node_modules folder, also didn't work.
When creating new slice, the slice folder, `model.json` and `mocks.json` is created, but no `index.tsx` file is created and the `prismicio-types.d.ts` is not updated with the new slice.
When tried to re-initialize the folder using `npx @slicemachine/init@latest` also got similar error, "Error in `@slicemachine/adapter-next` during `project:init`"
<br/>
Package Detail
package.json:
```json
{
"name": "next-prismic-boilerplate",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "concurrently \"npm:next:dev\" \"npm:slicemachine\" --names \"next,slicemachine\" --prefix-colors blue,magenta",
"next:dev": "next",
"build": "next build",
"start": "next start",
"lint": "next lint",
"slicemachine": "start-slicemachine",
"pretty": "prettier --write \"./**/*.{ts,tsx}\""
},
"dependencies": {
"@headlessui/react": "^1.7.15",
"@prismicio/client": "^7.0.0",
"@prismicio/next": "^1.3.3",
"@prismicio/react": "^2.3.0",
"@prismicio/slice-simulator-react": "^0.2.2",
"@reecem/prismic-sitemap": "^0.4.3",
"@sendgrid/mail": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"clsx": "^1.2.1",
"next": "^13.4.9",
"nextjs-progressbar": "^0.0.14",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.3.1"
},
"devDependencies": {
"@slicemachine/adapter-next": "^0.3.3",
"@types/node": "^17.0.31",
"@types/react": "^18.0.9",
"@types/react-dom": "^18.0.3",
"autoprefixer": "^10.4.7",
"concurrently": "^7.3.0",
"eslint": "8.15.0",
"eslint-config-next": "^13.4.9",
"postcss": "^8.4.13",
"postcss-import": "^15.0.0",
"prettier": "^3.0.0",
"prettier-plugin-tailwindcss": "^0.4.0",
"slice-machine-ui": "^1.5.1",
"tailwindcss": "^3.0.24",
"typescript": "^4.6.4"
}
}
```
<br>
</details>
### What is expected?
- Able to create new slice
- Able to edit existing slice
### What is actually happening?
- Unable to create new slice, got "Internal Error: Slice not created error"
- Unable to edit existing slice, got "@slicemachine/adapter-next` during `slice:update` hook: Cannot read properties of undefined (reading 'startsWith')"