storyblok / storyblok-tool-example

Example of a Storyblok toolbar app
storyblok-tool-example-git-master-storyblok-com.vercel.app
4 stars 1 forks source link

Cannot read property 'xxx' of undefined #1

Open christina-grannas opened 2 years ago

christina-grannas commented 2 years ago

I tried cloning this repo and walking through the steps in this guide: https://www.storyblok.com/docs/plugins/tool

I can see my app in the Tools panel but in the development terminal I get this error:

 ERROR  Cannot read property 'xxx' of undefined                                                                                                  

  at getStoryblokClient (node_modules/@storyblok/nuxt-auth/lib/utils/get-storyblok-client.js:16:40)
  at node_modules/@storyblok/nuxt-auth/lib/router.js:145:20
  at Layer.handle [as handle_request] (node_modules/express/lib/router/layer.js:95:5)
  at next (node_modules/express/lib/router/route.js:137:13)
  at Route.dispatch (node_modules/express/lib/router/route.js:112:3)
  at Layer.handle [as handle_request] (node_modules/express/lib/router/layer.js:95:5)
  at node_modules/express/lib/router/index.js:281:22
  at Function.process_params (node_modules/express/lib/router/index.js:335:12)
  at next (node_modules/express/lib/router/index.js:275:10)
  at Function.handle (node_modules/express/lib/router/index.js:174:3)
  at router (node_modules/express/lib/router/index.js:47:12)
  at Layer.handle [as handle_request] (node_modules/express/lib/router/layer.js:95:5)
  at trim_prefix (node_modules/express/lib/router/index.js:317:13)
  at node_modules/express/lib/router/index.js:284:7
  at Function.process_params (node_modules/express/lib/router/index.js:335:12)
  at next (node_modules/express/lib/router/index.js:275:10)

xxx being the ID of my space. I'm running version 1.4.0 of @storyblok/nuxt-auth were the error occurs.

Any ideas why this might happen?

I also cannot see the "You are currently editing {{story.name}}" either.

I have set CONFIDENTIAL_CLIENT_ID, CONFIDENTIAL_CLIENT_SECRET and CONFIDENTIAL_CLIENT_REDIRECT_URI in .env as specified in the guide.

christina-grannas commented 2 years ago

Seems to be working better when running version 1.3 of @storyblok/nuxt-auth