tabler / tabler-icons

A set of over 5500 free MIT-licensed high-quality SVG icons for you to use in your web projects.
https://tabler.io/icons
MIT License
18.03k stars 899 forks source link

Could not resolve "./icons/IconDeviceGamepad.svelte" #810

Closed ReallyVirtual closed 1 year ago

ReallyVirtual commented 1 year ago

Hi,

I'm getting the following error when I build a SvelteKit project:

Could not resolve "./icons/IconDeviceGamepad.svelte" from "node_modules/@tabler/icons-svelte/dist/svelte/tabler-icons-svelte.js"

and the one below when I do an npm run dev Failed to load url ./icons/IconDeviceGamepad.svelte (resolved id: ./icons/IconDeviceGamepad.svelte) in /run/media/rv/fedora_rvl5/root00/rv/my-very-long-project-path-here/node_modules/@tabler/icons-svelte/dist/svelte/tabler-icons-svelte.js. Does the file exist?

I've tried clearing the npm cache, creating another copy of the project, and a few other things. I'm on OpenSuse / node v20.5.1 if that helps, though v16.8 gives the same error.

I'd appreciate any pointers towards a solution.

Thanks.

MrBanhBao commented 1 year ago

I have the same issue.

vialcollet commented 1 year ago

Yes I have the same issue. I am using pnpm, node 18.x. Here is my relevant package.json:

{
    "name": "my-skeleton-app",
    "version": "0.0.1",
    "private": true,
    "scripts": {
...
    },
    "devDependencies": {
        "@skeletonlabs/skeleton": "^1.12.0",
        "@sveltejs/adapter-auto": "^2.1.0",
        "@sveltejs/kit": "^1.24.0",
        "@tailwindcss/forms": "^0.5.6",
        "@tailwindcss/typography": "^0.5.9",
        "@typescript-eslint/eslint-plugin": "^5.62.0",
        "@typescript-eslint/parser": "^5.62.0",
        "autoprefixer": "^10.4.15",
        "dotenv": "^16.3.1",
        "drizzle-kit": "^0.19.13",
        "eslint": "^8.48.0",
        "eslint-config-prettier": "^8.10.0",
        "postcss": "^8.4.29",
        "prettier": "^2.8.8",
        "prettier-plugin-svelte": "^2.10.1",
        "svelte": "^4.2.0",
        "svelte-check": "^3.5.1",
        "sveltekit-superforms": "^1.6.1",
        "tailwindcss": "^3.3.3",
        "tslib": "^2.6.2",
        "typescript": "^5.2.2",
        "vite": "^4.4.9",
        "vitest": "^0.25.8"
    },
    "type": "module",
    "dependencies": {
        "@tabler/icons-svelte": "^2.32.0",
        "eslint-plugin-svelte": "^2.33.0",
        "snarkdown": "^2.0.0",
        "svelte-markdown": "^0.4.0"
    }
}
mulder999 commented 1 year ago

Same issue on Linux, works on Windows. In file tabler-icons.d.ts there is IconDeviceGamePad and IconDeviceGamepad. Likely some casing issue...

hanszoons commented 1 year ago

Same problem, working on Mac, but not when building on the Linux server. Also SvelteKit and Vite, latest versions. Not using the gamepad icons either, yet they error.

To stop my vite build from failing, I had to revert to version 2.30.

gabrielnvian commented 1 year ago

Same issue, works on Windows, does not build on Debian in Github Actions

fabian-michael commented 1 year ago

Same Issue. Works fine on Mac but fails to build on Vercel. There are two imports with different casings but only IconDeviceGamePad.svelte exists

lltr commented 1 year ago

getting the same issue on new Sveltekit

node v18.17.1 pnpm 8.6.12

Error: Failed to load url ./icons/IconDeviceGamepad.svelte (resolved id: ./icons/IconDeviceGamepad.svelte)
...
kyoheiu commented 1 year ago

Same.

node v20.5.1
npm v9.8.1
sveltekit 1.20.4
@tabler/icons-svelte 2.34.0
tbone587 commented 1 year ago

Same issue and it was driving me nuts. It worked on my mac, but not within a docker container.

miguelgargallo commented 1 year ago

Same

node v18.17.1 npm 9.6.7 Svelte 3.54.0 SvelteKit 1.5.0 tabler/icons: 2.22.0

tallestlegacy commented 1 year ago

this fixes the issue

https://github.com/tabler/tabler-icons/pull/800#issuecomment-1727269107

miguelgargallo commented 1 year ago

Thanks

codecalm commented 1 year ago

fixed 🙂

miguelgargallo commented 1 year ago

AMAZING THANKS!