You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
create a solid project with vite npm create vite@latest.
install lucide-solid with npm install lucide-solid
try to use any icon import { ServerCrash } from 'lucide-solid';
Actual behavior
even though it works vscode gives the error on the import and the intellisense doesnt work.
message
Could not find a declaration file for module 'lucide-solid'. '.../node_modules/lucide-solid/dist/esm/lucide-solid.js' implicitly has an 'any' type.
There are types at '.../node_modules/lucide-solid/dist/types/lucide-solid.d.ts', but this result could not be resolved when respecting package.json "exports". The 'lucide-solid' library may need to update its package.json or typings.
The text was updated successfully, but these errors were encountered:
I solved this problem, it was a problem related to typescript version (4.9.4 -> 5.0.2). The solution was just add the types to the exports section on package.json on the lucide-solid package. reference.
But in the end this doesn't help anything, because later I discovered that on dev mode, both with the vite initializer and the solid start (npm init solid@latest), the treeshaking is not working, which leads to it shipping all icons. I dont know if theres a solution for this, maybe if it is possible to make imports unitary like lucide-solid/ServerCrash, but I think the problem lives in the solid related packages.
Prerequisites
Step to reproduce
npm create vite@latest
.npm install lucide-solid
import { ServerCrash } from 'lucide-solid';
Actual behavior
even though it works vscode gives the error on the import and the intellisense doesnt work.
message
The text was updated successfully, but these errors were encountered: