Closed frankstallone closed 2 years ago
Looks like my number 2 with the package confusion has been a long running issue. I see Alex talking about it all the way back in January this year here on this YouTube video.
I am also realizing that "localSliceSimulatorURL": "http://localhost:3000/slice-simulator"
doesn't happen when you run npx @slicemachine/init
because it is a step further down the documentation page here. Closing out this ticket because this is clearly growing pains that someone new like me will experience when starting new with Next.js and Prismic's slicemachine.
First, slicemachine is awesome. When I started working on the web professionally many years ago we created unique sections to create efficiencies between design and development in the agency world. I have since gone through the ringer of visual builders on WordPress. This mental model works really well IMHO. Thank you for putting this all together! I did not see this issue anywhere else but feel free to link and close this if it has already been posted.
Versions
Reproduction
npx create-next-app [unique name here] --use-npm
npx @slicemachine/init
and follow the prompts to completeWhat is expected?
I would expect
npx @slicemachine/init
to include"localSliceSimulatorURL": "http://localhost:3000/slice-simulator",
insm.json
. I would also expect@prismicio/react
andPrismicRichText
to be used if it supersedesprismic-reactjs
.What is actually happening?
"localSliceSimulatorURL": "http://localhost:3000/slice-simulator",
does not get added tosm.json
. This causes a failure when trying to add slices in slicemachine when runningnpm run slicemachine
locally/slices/
folder — however it usesimport { RichText } from 'prismic-reactjs'
which is not inpackage.json
.@prismicio/react
is installed so replacing that withimport { PrismicRichText } from 'prismic-reactjs'
does work.