storyblok / storyblok-astro

Astro SDK for Storyblok CMS
MIT License
163 stars 29 forks source link

Problem trying to use StoryblokComponent when following tutorial #460

Closed vstratful closed 1 year ago

vstratful commented 1 year ago

Describe the issue you're facing

I'm following the Storyblok Astro tutorial, and it looks like there's an issue in the latest version with StoryblokComponent.astro.

image

Reproduction

N/A

Steps to reproduce

Follow the tutorial here: https://www.storyblok.com/tp/add-a-headless-cms-to-astro-in-5-minutes

The example Page.astro and Grid.astro both import this component that doesn't seem to exist.

System Info

System:
    OS: Linux 5.15 Ubuntu 22.04.2 LTS 22.04.2 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 3700X 8-Core Processor
    Memory: 26.60 GB / 31.31 GB
    Container: Yes
    Shell: 5.1.16 - /bin/bash
  Binaries:
    Node: 18.17.1 - ~/.asdf/installs/nodejs/18.17.1/bin/node
    Yarn: 1.22.19 - ~/.asdf/shims/yarn
    npm: 10.1.0 - ~/.asdf/plugins/nodejs/shims/npm
    pnpm: 8.6.11 - ~/.asdf/shims/pnpm
  Browsers:
    Chrome: 115.0.5790.110

  "devDependencies": {
    "@astrojs/cloudflare": "^7.2.0",
    "@astrojs/tailwind": "^5.0.0",
    "@storyblok/astro": "^3.0.1",
    "@vitejs/plugin-basic-ssl": "^1.0.1",
    "astro": "^3.1.2",
    "prettier": "^3.0.3",
    "prettier-plugin-astro": "^0.12.0",
    "prettier-plugin-tailwindcss": "^0.5.4",
    "tailwindcss": "^3.3.3",
    "vite": "^4.4.9"
  }

Used Package Manager

npm

Error logs (Optional)

No response

Validations

vstratful commented 1 year ago

So it looks like the path has changed from "@storyblok/astro/StoryblokComponent.astro" to "@storyblok/astro/components/StoryblokComponent.astro", but when updating the import for the new path, I'm seeing these errors:

image

vstratful commented 1 year ago

Not sure what I changed, but it's working fine for me now and I can't reproduce the issue anymore. Very weird.

Closing the issue.

darpserj commented 1 year ago

Just started using StoryBlok and it also happened to me . Could it be because I'm using pnpm?

weaverhe commented 1 year ago

Yeah, I'm having the same issue as well. I'm just using regular old npm.

MrJonoCES commented 11 months ago

I'm experiencing this too, both with and without '/components' in the file path. Any idea on how to get past this?

anthonykusuma commented 10 months ago

I got the same error again. Can we reopen this issue?