`pnpm generate` fails after clean clone due to type-only export not found at runtime
### Describe the bug
For some context, I'm looking to contribute to `@solid-primitives/virtual` and make it more robust for complex use cases (that I need for another project).
I'm able to clone the repo, install all packages, build, and run tests (all passed) completely fine. However, I need to be able to run the dev server to test the new features I'm adding to `virtual` in browser, and that's where I run into issues.
1. `pnpm run dev` inside `packages/virtual` returns this error: ```Error: No packages found. Did you run `pnpm generate`?```.
2. Running `pnpm run generate` inside the root dir yields this:
```bash
user@users-MacBook-Air solid-primitives % pnpm run generate
> solid-primitives@ generate /Users/user/Documents/Coding/Web/solid-primitives
> pnpm run build && pnpm -dir site run generate
> solid-primitives@ build /Users/user/Documents/Coding/Web/solid-primitives
> node --import=@nothing-but/node-resolve-ts --experimental-transform-types ./scripts/build.ts
(node:21996) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
esbuild step completed in 471ms.
tsc step completed in 632ms.
> site@ generate /Users/user/Documents/Coding/Web/solid-primitives/site
> node --import=@nothing-but/node-resolve-ts --experimental-transform-types ./scripts/generate.ts
(node:22019) ExperimentalWarning: Type Stripping is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
file:///Users/user/Documents/Coding/Web/solid-primitives/site/src/types.ts:1
export { FormattedBytes, ModuleData };
^^^^^^^^^^^^^^
SyntaxError: Export 'FormattedBytes' is not defined in module
at compileSourceTextModule (node:internal/modules/esm/utils:344:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:105:18)
at ModuleLoader.<anonymous> (node:internal/modules/esm/translators:473:10)
at #translate (node:internal/modules/esm/loader:534:12)
at ModuleLoader.loadAndTranslate (node:internal/modules/esm/loader:581:27)
Node.js v22.17.0
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Command failed with exit code 1.
```
### Environment
```
Node (installed via nvm): v22.17.0 (tried with v24.3.0 as well, same result)
pnpm (installed via brew): 10.12.1
OS: MacOS Sequoia 15.2 Apple Silicon (M1)
```
Fresh Clone from `main` ([`0b567a9`](https://github.com/solidjs-community/solid-primitives/commit/0b567a9253a11d79146fbf026f0f5b0ac00f0fdb)) with No Changes
## Reproduction
I'm assuming this is an issue specific to MacOS or something along those lines as I'm sure this would have come up already if it weren't.
1. Clone fresh from main: `git clone https://github.com/solidjs-community/solid-primitives`
2. Install Packages `cd solid-primitives && pnpm install`
3. Run `pnpm generate` and observe the error
*Note: The MRE link is the main repo because I ran into this issue simply by cloning without changing anything and running a couple commands.*
### Minimal Reproduction Link
https://github.com/solidjs-community/solid-primitives
关闭于 2025-06-29 6 条评论