Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with modules #58

Open
semiautomatix opened this issue Nov 23, 2023 · 3 comments
Open

Issues with modules #58

semiautomatix opened this issue Nov 23, 2023 · 3 comments

Comments

@semiautomatix
Copy link

I'm busy with Solid Start project that requires icons.

Very excited for solid-icons, but I'm struggling to use this in my component library.

12:48:43 PM [vite] Error when evaluating SSR module ~start/entry-server: failed to import "/@fs/workspace/monorepo/node_modules/.pnpm/solid-start@0.3.10_@solidjs+meta@0.29.1_@solidjs+router@0.8.4_solid-js@1.8.5_solid-start-node@0.3.10_vite@4.5.0/node_modules/solid-start/entry-server/index.ts"
|- /workspace/monorepo/node_modules/.pnpm/solid-icons@1.1.0_solid-js@1.8.5/node_modules/solid-icons/hi/index.js:1
import { IconTemplate } from "../lib/index.jsx";
^^^^^^

SyntaxError: Cannot use import statement outside a module
    at internalCompileFunction (node:internal/vm:73:18)
    at wrapSafe (node:internal/modules/cjs/loader:1153:20)
    at Module._compile (node:internal/modules/cjs/loader:1205:27)
    at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
    at Module.load (node:internal/modules/cjs/loader:1091:32)
    at Module._load (node:internal/modules/cjs/loader:938:12)
    at cjsLoader (node:internal/modules/esm/translators:284:17)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:234:7)
    at ModuleJob.run (node:internal/modules/esm/module_job:217:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:316:24)
    at async nodeImport (file:///workspace/monorepo/node_modules/.pnpm/vite@4.5.0_@types+node@20.9.1_less@4.2.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56097:17)
    at async ssrImport (file:///workspace/monorepo/node_modules/.pnpm/vite@4.5.0_@types+node@20.9.1_less@4.2.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:55990:24)
    at async eval (/workspace/monorepo/packages/flowbite-react-solid/dist/server.mjs:6:31)
    at async instantiateModule (file:///workspace/monorepo/node_modules/.pnpm/vite@4.5.0_@types+node@20.9.1_less@4.2.0/node_modules/vite/dist/node/chunks/dep-bb8a8339.js:56052:9)

"solid-start": "^0.3.10"

$ node -v
v20.9.0

"name": "solid-icons",
"version": "1.1.0",

import { HiOutlineChevronLeft, HiOutlineChevronRight } from "solid-icons/hi";
@carere
Copy link

carere commented Nov 27, 2023

Same problem here...

@carere
Copy link

carere commented Nov 27, 2023

@semiautomatix I switched back to the previous version, latest version broke something

@Hentioe
Copy link

Hentioe commented Mar 14, 2024

The latest version 1.1.0 will cause errors, I tried the old version 1.0.12 and everything works fine.

Update: After I switched to Vite, the latest version no longer has build errors. Previously I used Webpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants