themesberg / flowbite-svelte-blocks

Flowbite-Svelte-Blocks components
https://flowbite-svelte-blocks.vercel.app/
MIT License
94 stars 20 forks source link

No matching export in `flowbite-svelte-icons` for import "ChevronRightSolid". #54

Closed comalice closed 7 months ago

comalice commented 7 months ago

Describe the bug

I just added flowbite-svelte-blocks as a dependency of my project and I'm getting an error 500 in the browser and the following from vite dev:

✘ [ERROR] No matching export in "node_modules/flowbite-svelte-icons/dist/index.js" for import "ChevronRightSolid"
frontend-1  | 
frontend-1  |     node_modules/flowbite-svelte-blocks/dist/hero/News.svelte:39:9:
frontend-1  |       39 │ import { ChevronRightSolid } from "flowbite-svelte-icons";
frontend-1  |          ╵          ~~~~~~~~~~~~~~~~~
frontend-1  | 
frontend-1  | ✘ [ERROR] No matching export in "node_modules/flowbite-svelte-icons/dist/index.js" for import "CheckSolid"
frontend-1  | 
frontend-1  |     node_modules/flowbite-svelte-blocks/dist/pricing/PricingItem.svelte:37:9:
frontend-1  |       37 │ import { CheckSolid } from "flowbite-svelte-icons";
frontend-1  |          ╵          ~~~~~~~~~~
frontend-1  | 
frontend-1  | 2:14:28 AM [vite] error while updating dependencies:
frontend-1  | Error: Build failed with 2 errors:
frontend-1  | node_modules/flowbite-svelte-blocks/dist/hero/News.svelte:39:9: ERROR: No matching export in "node_modules/flowbite-svelte-icons/dist/index.js" for import "ChevronRightSolid"
frontend-1  | node_modules/flowbite-svelte-blocks/dist/pricing/PricingItem.svelte:37:9: ERROR: No matching export in "node_modules/flowbite-svelte-icons/dist/index.js" for import "CheckSolid"
frontend-1  |     at failureErrorWithLog (/app/node_modules/esbuild/lib/main.js:1651:15)
frontend-1  |     at /app/node_modules/esbuild/lib/main.js:1059:25
frontend-1  |     at /app/node_modules/esbuild/lib/main.js:1527:9
frontend-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Reproduction

https://github.com/comalice/svelte-pocketbase/tree/flowbite-svelte-integration

  1. Run docker compose -f docker-compose.yml up in the repo root.
  2. When the frontend comes up, go to http://localhost:5173/Login2. The UI will load and then re-render to an error 500.

Flowbite version and System Info

System:
    OS: Linux 6.7 Arch Linux
    CPU: (8) x64 Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz
    Memory: 3.54 GB / 31.28 GB
    Container: Yes
    Shell: 5.9 - /usr/bin/zsh
  Binaries:
    Node: 21.7.0 - /usr/bin/node
    Yarn: 1.22.21 - /usr/bin/yarn
    npm: 10.5.0 - /usr/bin/npm
    pnpm: 8.8.0 - /usr/bin/pnpm
  Browsers:
    Chromium: 122.0.6261.128
  npmPackages:
    @sveltejs/kit: ^2.0.0 => 2.5.4 
    flowbite-svelte: ^0.44.24 => 0.44.24 
    svelte: ^4.2.7 => 4.2.12 
    vite: ^5.0.3 => 5.2.6 

package.json

{
    "name": "frontend",
    "version": "0.0.1",
    "private": true,
    "scripts": {
        ".env": "export $(cat .env | xargs) &&",
        "dev": "vite dev",
        "build": "vite build",
        "build:db-types": "npm run .env && npx typed-pocketbase --email $PRIVATE_ADMIN_EMAIL --password $PRIVATE_ADMIN_PASSWORD -o ./lib/pocketbase/DatabaseTypes.d.ts",
        "preview": "vite preview",
        "test": "npm run test:integration && npm run test:unit",
        "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
        "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
        "lint": "prettier --check . && eslint .",
        "format": "prettier --write .",
        "test:integration": "playwright test",
        "test:unit": "vitest"
    },
    "devDependencies": {
        "@playwright/test": "^1.28.1",
        "@popperjs/core": "^2.11.8",
        "@sveltejs/adapter-auto": "^3.0.0",
        "@sveltejs/kit": "^2.0.0",
        "@sveltejs/vite-plugin-svelte": "^3.0.0",
        "@tailwindcss/forms": "^0.5.7",
        "@types/eslint": "^8.56.0",
        "@typescript-eslint/eslint-plugin": "^7.0.0",
        "@typescript-eslint/parser": "^7.0.0",
        "autoprefixer": "^10.4.19",
        "eslint": "^8.56.0",
        "eslint-config-prettier": "^9.1.0",
        "eslint-plugin-svelte": "^2.35.1",
        "flowbite": "^2.3.0",
        "flowbite-svelte": "^0.44.24",
        "flowbite-svelte-blocks": "^1.1.0",
        "flowbite-svelte-icons": "^1.5.0",
        "pocketbase": "^0.21.1",
        "postcss": "^8.4.38",
        "prettier": "^3.1.1",
        "prettier-plugin-svelte": "^3.1.2",
        "svelte": "^4.2.7",
        "svelte-check": "^3.6.0",
        "tailwind-merge": "^2.2.2",
        "tailwindcss": "^3.4.1",
        "tslib": "^2.4.1",
        "typed-pocketbase": "^0.1.0",
        "typescript": "^5.0.0",
        "vite": "^5.0.3",
        "vitest": "^1.2.0"
    },
    "type": "module"
}
shinokada commented 7 months ago

You need to install flowbite-svelte-icons@0.4.5 for now.

TiagoSilvaLourenco commented 7 months ago

You need to install flowbite-svelte-icons@0.4.5 for now.

Thank you it's worked for me.