Open benjifriedman opened 1 year ago
Hey @benjifriedman ! May I know which token are you using from Storyblok?
Hi @arorachakit, I have a "demo space" and another space in the Storyblok admin. The other space (the one I got the error on) had access level "Preview". I see in the demo space there are three tokens. The Theme access level results in an error, Preview results in a blank page, and Public also results in an error. It just says
Unhandled Runtime Error
Error: Error: [object Object]
You should be using either the preview or public token. Though there can a few cases why it isn't working. Public token only gives you the access to published data, and if you try to retrieve draft content with that, then it will throw an error.
Also, it could be an issue when you are trying to retrieve published data but nothing is published. Since you say preview results in a blank page, then I assume there is no error there and something might be wrong on the front end side.
Are you replacing the token at both the places in the Next project? Also, going through the tutorial here might be of help - https://www.storyblok.com/tp/add-a-headless-cms-to-next-js-13-in-5-minutes
Hey @benjifriedman ! Were you able to resolve it?
@arorachakit Thanks for checking in. I still see the blank page with the preview token, a runtime error with the public token. The main thing is that in Storyblok, I see "page.liquid is missing" on the homepage and landing page
@benjifriedman - did you change the preview URL? This is strange, and shouldn't happen usually. There might be something missing in the setup.
Did you follow the tutorial yet? Or did you try to clone and see the differences?
Also experiencing the template not working. I followed the steps and attempted it multiple times.
event compiled successfully in 128 ms (326 modules)
error { source: 'server', message: {} }
error { name: 'Error', source: 'server', message: 'Error: [object Object]', stack: '', digest: '294329633' }
┌ GET / 200 in 1691ms │ └──── get https://api.storyblok.co../v2/cdn/stories/home?version=draft&t.. 401 in 944ms (cache: MISS)
Hey @jonvillalobos - are you using your access token at both of the required places?
The Template does not work for me either. I've just do a quick check:
Preview
level oneHey @yeuem1vannam ! Are you replacing the token at both places? I mean here as well - https://github.com/storyblok/next.js-13-boilerplate/blob/main/components/StoryblokProvider.js#L13C33-L13C33
same issues here, token in both places but no luck. I at least get "Unhandled Runtime Error Error: Error: [object Object]" instead of a blank page
Also doesn't work for me. I replaced the token in both places. I'm on node v20.11.1.
npm run dev
works.
npm run build
on next version 13.4.2 gets stuck with this message:
- info Collecting page data
[ ] - info Generating static pages (0/4)TypeError: _err_message.includes is not a function
On next version 14.2.2 it also doesn't work and throws this error:
TypeError: u.includes is not a function
Hi, I followed the steps to install and am getting this error in the console. I used npm and not yarn. Let me know if you need any other information.