I created a repo based on this template: https://github.com/prismicio-community/slice-machine-starter-next
The only things I changed are:
sm.json, I set it to
accessToken in the
Client to make it aware of access token. based on this guide: Next.js and Prismic - Prismic
I also ran
slicemachine entrypoint and synced 2 custom types into my Prismic account:
Now the problem.
yarn build. Everything works as expected:
Go to Prismic web page and create
yarn build again and.....
I can't understand what I'm doing wrong, cause there are no error messages at all from Prismic side.
Note 1: I also tried default
Client from this repo (without the diff above), result is the same
Note 2: I also tried to use pure client, result is weird, see "Unexpected end of JSON input" when requesting an object via client
It looks like you might have deleted
.cdn from the API endpoint. Is that the case? Your endpoint should be:
Yep, forgot to mention I tried
.cdn as well, but to prove it, here is my complete result of a
git diff command (token is trimmed intentionally)
It again hangs until it reaches the timeout
Well guys I think I figured out what might be the issue. My account was registered a year ago and as far as I remember, there was no slice machine at that time. Yesterday I tried to register a fresh account in Prismic, and follow the same exact steps -- everything worked like a charm. But this is really strange to me, and unfortunately I spent like a day just in vain trying to figure out if I do something wrong. If you want to perform some debugging, my "old" account's repo is
fbjorn, and fresh one (tied to second account) is
fbjorn123. I'd still appreciate some information regarding this issue if possible.
Were you using an old repo? Or was it a newly-created repo in your old account?
If you created the repo a year ago, it probably wouldn't work with Slice Machine, so that makes sense. Let me know if it keeps giving you trouble.