Get this issue when i try to run my dev server. Have runned @slicemachine/init@latest
These dependencies were not found: friendly-errors 11:12:49
friendly-errors 11:12:49
* @prismicio/simulator/kit in ./node_modules/@slicemachine/adapter-nuxt2/dist/simulator/SliceSimulator.cjs
* ~/slices in ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/slice-simulator.vue?vue&type=script&lang=js&
Welcome to the Prismic community, and thanks for reaching out to us.
I followed this setup article and couldn't reproduce the same error.
What version of node and npm do you have?
I have node -v: v16.15.1 and npm version 9.6.4.
I was migrating slice-machine from 0.7 to 1.5.1
Slice machine work fine, but dev server is broken.
I can fix dependancies errors by manually installing slize-zone dependancy that is not found and removing slice-simulator.vue page (to resolve temporary @prismicio/simulator/kit not found issue), but now I have to following error: Cannot use import statement outside a module.
Slize-zone is now imported via @slicemachine/adapter-nuxt2 so we need to remove the import (nuxt will do the import automatically). I wish there were a better migration guide to switch to @slicemachine/adapter-nuxt2, there was some package to remove as well (nuxt-sm, @prismicio/slice-simulator-vue, vue-slicezone, etc).
I still have the same dependency error for @prismicio/simulator:
This dependency was not found:
* @prismicio/simulator/kit in ./node_modules/@slicemachine/adapter-nuxt2/dist/simulator/SliceSimulator.cjs
To install it, you can run: npm install --save @prismicio/simulator/kit
For now, I have removed slice-simulator.vue.
Obviously, the slice simaltor is not working but at least I can get my dev server running.
I have try to use node lts (v18.16.1) instead, but this don't fix the bug.
Hello! I have this same error in Nuxt 2, when I updated @slicemachine/adapter-nuxt2 to any version after 0.3.0. My dev server breaks with the message:
ERROR in ./node_modules/@slicemachine/adapter-nuxt2/dist/simulator/SliceSimulator.cjs
Module not found: Error: Can't resolve '@prismicio/simulator/kit' in '[my-project-folder]/node_modules/@slicemachine/adapter-nuxt2/dist/simulator'
The adapter is specified correctly in slicemachine.config.json. Slice Machine runs perfectly fine, except for the simulator.
This is how I'm importing the simulator in slice-simulator.vue:
import { SliceSimulator } from '@slicemachine/adapter-nuxt2/dist/simulator.cjs'
I backtracked from the latest adapter-nuxt2 release, 0.3.6, all the way to 0.3.0 and found that the error occurs in version 0.3.1 and above. For now, the only fix I found is manually setting the adapter version @ 0.3.0.
Any updates on this issue? I'm running Nuxt v2.17.0, and Node v18.16.0
Same here ! If I manually set the adapter version to @0.3.0 it work.
@Priyanka Yes I have install @slicemachine/adapter-nuxt2, set it in slicemachine.config.json and I have the following import in my slice-simulator.vue: import { SliceSimulator } from '@slicemachine/adapter-nuxt2/dist/simulator.cjs'
I'm on Nuxt 2, i followed the prismic install, and i have these error:
These dependencies were not found: friendly-errors 11:50:16
friendly-errors 11:50:16
* @prismicio/simulator/kit in ./node_modules/@slicemachine/adapter-nuxt2/dist/simulator/SliceSimulator.cjs friendly-errors 11:50:16
* ~/slices in ./node_modules/babel-loader/lib??ref--2-0!./node_modules/vue-loader/lib??vue-loader-options!./pages/slice-simulator.vue?vue&type=script&lang=js&
@prismicio/client and @prismicio/vue still have issues. They do go away with the fix.
As for the ~/slices error, it's a more understandable breaking error since it doesn't exist until a slice is created (or an empty slices/index.js file), which goes away easily.
But to have to implement a manual fix on @prismicio/client and @prismicio/vue imports for every new project can become a hassle. I hope the dev team can make this easier! In any case, the fix works for now, thank you so much for your response.