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

SolidStart issues with bun and vite building #7429

Closed
itsyoboieltr opened this issue Dec 3, 2023 · 6 comments
Closed

SolidStart issues with bun and vite building #7429

itsyoboieltr opened this issue Dec 3, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@itsyoboieltr
Copy link

What version of Bun is running?

1.0.15+b3bdf22eb

What platform is your computer?

Darwin 23.1.0 arm64 arm

What steps can reproduce the bug?

The bug came up as I was developing my bun-based stack, called DBEST (DrizzleORM, Bun, ElysiaJS, SolidStart, Tailwind CSS). I made a reproduction branch available here: reprod

Steps:

  1. Clone repo, switch to reprod branch, which is a minimal reprod based on the original branch.
  2. bun i
  3. bun run build:node
  • This should behave as expected, producing a production build.
  1. bun run build:bun
  • Errors, and hangs forever.

What is the expected behavior?

$ solid-start build
 solid-start build 
 version  0.3.10
 adapter  node

solid-start building client...
solid-start rendering index.html...
solid-start index.html rendered in: 930.784ms
vite v4.4.9 building for production...
node_modules/solid-start/islands/A.tsx (1:0) Module level directives cause errors when bundled, "use client" in "node_modules/solid-start/islands/A.tsx" was ignored.
✓ 59 modules transformed.
dist/public/.solid/index.html           0.18 kB │ gzip:  0.16 kB
dist/public/manifest.json               0.52 kB │ gzip:  0.21 kB
dist/public/ssr-manifest.json           1.42 kB │ gzip:  0.36 kB
dist/public/assets/index-6d4de98c.css   6.22 kB │ gzip:  1.87 kB
dist/public/assets/index-d53cc4fb.js    4.74 kB │ gzip:  2.08 kB
dist/public/assets/index-e212aa18.js   37.15 kB │ gzip: 14.57 kB
✓ built in 638ms
solid-start client built in: 1.585s

solid-start building server...
vite v4.4.9 building SSR bundle for production...
node_modules/solid-start/islands/A.tsx (1:0) Module level directives cause errors when bundled, "use client" in "node_modules/solid-start/islands/A.tsx" was ignored.
✓ 54 modules transformed.
.solid/server/manifest.json     0.24 kB
.solid/server/entry-server.js  14.97 kB
✓ built in 284ms
solid-start server built in: 294.301ms

What do you see instead?

$ bun --bun solid-start build
 solid-start build 
 version  0.3.10
[bun] Warning: worker_threads.Worker option "execArgv" is not implemented.
 adapter  bun

solid-start building client...
solid-start rendering index.html...
[bun] Warning: worker_threads.Worker option "execArgv" is not implemented.
[942.59ms] solid-start index.html rendered in
386 |             }
387 |           );
388 | 
389 |           const terminateShell = () => {
390 |             if (process.platform === 'win32') proc.kill()
391 |             else process.kill(-proc.pid);
                       ^
RangeError: pid must be a positive integer
      at terminateShell (node_modules/solid-start/bin.cjs:391:18)
      at node_modules/solid-start/bin.cjs:418:11
      at processTicksAndRejections (:61:77)

Additional information

No response

@itsyoboieltr itsyoboieltr added the bug Something isn't working label Dec 3, 2023
@itsyoboieltr
Copy link
Author

Interesting observation: this only happens if ssr: false in vite.config.ts. If the default options are used, it builds.

@birkskyum
Copy link
Collaborator

Duplicate of

It'll be interesting to see how the upcoming SolidStart release (Vite 5, Nitro, Vinxi) will fare with bun.

@birkskyum birkskyum closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2023
@AritraBanik08
Copy link

Can anyone please check here and tell me the problem or can you help me fix it. It is giving the error [bun] Warning: worker_threads.Worker option "execArgv" is not implemented.

@birkskyum
Copy link
Collaborator

What version of bun do you use?

@AritraBanik08
Copy link

@birkskyum bun version 1.0.11

@birkskyum
Copy link
Collaborator

It might help to upgrade to the latest, 1.0.26. bun upgrade

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants