solid-bootstrap: Doesn't work with npm and Solid Start
As soon as I import anything from solid-bootstrap I get this error
An error occured while server rendering /:
Cannot use import statement outside a module
C:\Users\Oren\Desktop\work-related\solid-start-bootstrap-test\node_modules\@popperjs\core\lib\modifiers\arrow.js:1
import getBasePlacement from "../utils/getBasePlacement.js";
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:360:18)
at wrapSafe (node:internal/modules/cjs/loader:1055:15)
at Module._compile (node:internal/modules/cjs/loader:1090:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10)
at Module.load (node:internal/modules/cjs/loader:1004:32)
at Function.Module._load (node:internal/modules/cjs/loader:839:12)
at ModuleWrap.<anonymous> (node:internal/modules/esm/translators:170:29)
at ModuleJob.run (node:internal/modules/esm/module_job:193:25)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:533:24)
at async nodeImport (solid-start-bootstrap-test/node_modules/vite/dist/node/chunks/dep-67e7f8ab.js:53137:21)
at async eval (/node_modules/solid-bootstrap-core/esm/popper.js:3:44)
at async instantiateModule (solid-start-bootstrap-test/node_modules
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16
It work! I’m closing this issue.
There were some funky imports related to popper in the original core library.
I replaced those with normal imports and published 1.0.11 which seems to resolve this issue.
@orenelbaum - could you please confirm this is resolved sometime?
with pnpm, this bug is reproduced by
all other dependencies are harmless
Got to stop now and get some sleep - but published
1.0.10which resolves all known issues with Solid Start …when usingpnpm.Still need to do some research on this specific issue with
npmnot working with the esm build.I’ve run out of weekend here. Still work to do, but most components (without transitions) are working now with solid-start (using pnpm). Hopefully I’ll get some more time to finish that off next weekend.
In the meantime, someone might have figured out whatever the build issue is that is upsetting npm. It won’t be a code thing - probably just some vite configuration or package.json thing.