Failed To Resolve

I tried importing onMount on a component but it results in vite saying
Pre-transform error: Failed to resolve import "solid-js/store/types/server.js" from "src/App.tsx". Does the file exist?
8:56:18 PM [vite] Pre-transform error: Failed to resolve import "solid-js/types/server/reactive.js" from "src/components/DrawComponents.tsx". Does the file exist?
8:56:18 PM [vite] Internal server error: Failed to resolve import "solid-js/store/types/server.js" from "src/App.tsx". Does the file exist?
Pre-transform error: Failed to resolve import "solid-js/store/types/server.js" from "src/App.tsx". Does the file exist?
8:56:18 PM [vite] Pre-transform error: Failed to resolve import "solid-js/types/server/reactive.js" from "src/components/DrawComponents.tsx". Does the file exist?
8:56:18 PM [vite] Internal server error: Failed to resolve import "solid-js/store/types/server.js" from "src/App.tsx". Does the file exist?
3 Replies
McBrincie212
McBrincie212OP4mo ago
i import onMount fyi apparently im getting more related failed to resolve import errors
Madaxen86
Madaxen864mo ago
Check the import again. It should be imported directly from "solid-js" TS sometimes suggest nested directories which lead to errors
McBrincie212
McBrincie212OP4mo ago
oh ok solved it thx it was that
Want results from more Discord servers?
Add your server