Closed theClarkSell closed 2 years ago
Hey, thanks for the kind words and the suggestion, I'll look that up soon ! :)
I had the same problem, @csell5 that did not fix it. @Oli8 - Agreed. Beautiful UI. Can't wait to use it!
I am getting a new error in SvelteKit:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'C:\web projects\my-project\node_modules\spaper\components\Modal' is not supported resolving ES modules imported from C:\web projects\my-project\node_modules\spaper\index.js
at new NodeError (internal/errors.js:322:7)
at finalizeResolution (internal/modules/esm/resolve.js:304:17)
at moduleResolve (internal/modules/esm/resolve.js:731:10)
at Loader.defaultResolve [as _resolve] (internal/modules/esm/resolve.js:842:11)
at Loader.resolve (internal/modules/esm/loader.js:89:40)
at Loader.getModuleJob (internal/modules/esm/loader.js:242:28)
at ModuleWrap.<anonymous> (internal/modules/esm/module_job.js:76:40)
at link (internal/modules/esm/module_job.js:75:36)
with the simple lines:
import { Navbar, Card } from 'spaper';
The older version worked.
J
I am getting the same issue with Modal imports when not using the modal.
I am getting the same issue as well when using e.g. <Button>
.
13:28:39 [vite] Error when evaluating SSR module /src/routes/index.svelte:
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import 'C:\workspaces\web\gtg-svelte\node_modules\spaper\components\Modal' is not supported resolving ES modules imported from C:\workspaces\web\gtg-svelte\node_m
odules\spaper\index.js
at new NodeError (node:internal/errors:371:5)
at finalizeResolution (node:internal/modules/esm/resolve:412:17)
at moduleResolve (node:internal/modules/esm/resolve:932:10)
at defaultResolve (node:internal/modules/esm/resolve:1044:11)
at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
at link (node:internal/modules/esm/module_job:75:36)
As of v0.2.6 lodash omit and pick are no longer required. Component imports should work fine.
Ran across this recently and went to play with it. Love it, thank you for the hard work.
I believe some work needs to be done to work out of the box for SvelteKit. Upon running you will get this error
You can resolve it by adding this to your svelte.config.js file but I think it really needs to be converted to a module.
I didn't have a chance to look through the source yet but I wanted to drop this here for others.