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

Support SolidStart #3736

Open
1 of 2 tasks
paperdave opened this issue Jul 22, 2023 · 62 comments
Open
1 of 2 tasks

Support SolidStart #3736

paperdave opened this issue Jul 22, 2023 · 62 comments
Labels
tracking An umbrella issue for tracking big features

Comments

@paperdave
Copy link
Member

paperdave commented Jul 22, 2023

Now that Vite (#250) is working, it's now time to start getting all of the vite-powered frameworks working.

The current blockers for SolidStart:

  • Dependency on node's --experiemntal-vm-modules flag
  • Event loop bug causing the process to exit prematurely while loading es-module-loader Unified event loop #3741
@paperdave paperdave mentioned this issue Jul 22, 2023
@birkskyum
Copy link
Collaborator

birkskyum commented Jul 22, 2023

Repro:

  • Go to a new directory
  • bun x create-solid@latest
  • Select either option regarding template (bare is the simplest Hello World example)
  • Select either option regarding SSR
  • Select either option regarding TypeScript
  • bun i
  • bun --bun run dev

@Jarred-Sumner
Copy link
Collaborator

@birkskyum can you upgrade to canary and give it another try? bun upgrade --canary

@birkskyum
Copy link
Collaborator

birkskyum commented Jul 22, 2023

Update for canary (hash 3418feb)

solid-start: 0.3.4 (Currently active version)

Result of above repro:

Cannot GET / instead of showing the Hello World page

In more advanced cases (an app I work on) I get this result now using both Bun and Node adapter:

error when starting dev server:
NotImplementedError: node:http2 createSecureServer is not yet implemented in Bun. Track the status & thumbs up the issue: https://github.com/oven-sh/bun/issues/887
    at new NotImplementedError (node:http2:14:10)
    at throwNotImplemented (node:http2:2:68)
    at createSecureServer (node:http2:25:22)

Blocked by

@Jarred-Sumner Jarred-Sumner added the tracking An umbrella issue for tracking big features label Jul 24, 2023
@birkskyum
Copy link
Collaborator

birkskyum commented Aug 13, 2023

Tried movies template of bunx create-solid ./my-solid-app, and it error with:

➜ bun --bun run dev -- --open
$ solid-start dev --open
 solid-start dev 
 version  0.3.2


error: Cannot find package "preact" from "file:///Users/admin/repos/my-solid-app/node_modules/local-pkg/index.mjs"

[bun] Warning: worker_threads.Worker option "execArgv" is not implemented.

@quantuminformation
Copy link

yes pls

We've ported a SS project over to bun, but get this

[solid] file:///Users/nikos/WebstormProjects/coffeeconnect/node_modules/solid-start/node/fetch.js:73
[solid] export class NodeRequest extends Request {
[solid]                                  ^

@birkskyum
Copy link
Collaborator

Which adapter do you use?

@quantuminformation
Copy link

googles Node adapter

@quantuminformation
Copy link

any docs for adaptors?

@birkskyum
Copy link
Collaborator

@quantuminformation , not sure I understand googles Node adapter - can you share your vite config?

@quantuminformation
Copy link

import solid from 'solid-start/vite';
import { defineConfig } from 'vite';
import dotenv from 'dotenv';

export default defineConfig(() => {
  dotenv.config();
  return {
    plugins: [solid()],
    test: {
      deps: {
        registerNodeLoader: true,
      },
      environment: 'jsdom',
      globals: true,
      setupFiles: ['node_modules/@testing-library/jest-dom/extend-expect'],
      transformMode: { web: [/\.[jt]sx?$/] },
    },
    ssr: {
      external: ['@prisma/client'],
    },
  };
});

@marcusbuffett
Copy link

marcusbuffett commented Sep 13, 2023

CleanShot 2023-09-13 at 14 57 47@2x

I get this when trying to run just a bare Solid Start project, with Bun 1.0.1.

It seems to launch the server, but because of the Streams error, it doesn't actually serve on localhost:3000

@birkskyum
Copy link
Collaborator

birkskyum commented Sep 13, 2023

@marcusbuffett
Copy link

marcusbuffett commented Sep 13, 2023

@birkskyum I believe the worker thing isn't the main problem, it's the globalThis TypeError thing that's really breaking things – if I comment out that object assign, it serves pages

@quantuminformation
Copy link

my issue was fixed moving to node 18 from 16

@birkskyum
Copy link
Collaborator

birkskyum commented Dec 1, 2023

Tried to run an example of the upcoming solid-start release. It's still WIP, so I expected bugs, but interestingly this example does work fine in node, but breaks with bun:

solid-start/examples/bare onvinxi [$!?] viav18.19.0 took 4.1s 
➜ bun --bun run dev
$ vinxi dev
36 |     );
37 | }
38 | 
39 | export function defineConfig(baseConfig = {}) {
40 |   let { plugins = [], ssr = true, start = {}, ...userConfig } = baseConfig;
41 |   const extensions = [...DEFAULT_EXTENSIONS, ...(start.extensions || [])];
                            ^
ReferenceError: Cannot access uninitialized variable.
      at defineConfig (/Users/admin/repos/solid-start/packages/start/config/index.js:41:25)
      at evalModule (/Users/admin/repos/solid-start/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:256441)
      at jiti (/Users/admin/repos/solid-start/node_modules/.pnpm/jiti@1.21.0/node_modules/jiti/dist/jiti.js:1:254369)
      at /Users/admin/repos/solid-start/node_modules/.pnpm/c12@1.5.1/node_modules/c12/dist/index.mjs:288:15
      at resolveConfig (/Users/admin/repos/solid-start/node_modules/.pnpm/c12@1.5.1/node_modules/c12/dist/index.mjs:234:29)
      at /Users/admin/repos/solid-start/node_modules/.pnpm/c12@1.5.1/node_modules/c12/dist/index.mjs:116:39
      at loadConfig (/Users/admin/repos/solid-start/node_modules/.pnpm/c12@1.5.1/node_modules/c12/dist/index.mjs:86:26)
      at /Users/admin/repos/solid-start/node_modules/.pnpm/vinxi@0.0.48_debug@4.3.4_rollup@3.28.1/node_modules/vinxi/lib/load-app.js:35:28
      at processTicksAndRejections (:61:76)

vinxi hook app:config-resolved                                                              3:10:47 AM
vinxi hook app:created 

It claims that DEFAULT_EXTENSIONS is uninitialized, but in the top of ./packages/start/config/index.js where the error happen, it's defined as:

const DEFAULT_EXTENSIONS = ["js", "jsx", "ts", "tsx"];

@birkskyum
Copy link
Collaborator

There was a big new release on the solid-start side (@solidjs/start 0.4), but the error: ReferenceError: Cannot access uninitialized variable. was the same, and the initially presented reproduction instructions are still relevant as they now use this new version.

@itsyoboieltr
Copy link

As the latest version, it seems to be that ReferenceError: Cannot access uninitialized variable. is no longer an issue. The new error message I am getting is zlib.brotliCompress is not implemented. Could it be that this is the last missing piece of the puzzle to make this work?

Probably connected issue: #267

@birkskyum
Copy link
Collaborator

birkskyum commented Jan 5, 2024

The only issue I still face is the server part of http2 missing when https is turned on in localhost (which is quite common). Otherwise everything runs - do any of you still experience issues with latest versions of start (>= 0.4.3) and vinxi (>= 0.1.1)?

@willpuckett
Copy link

New versions seem to have fixed things here...

@itsyoboieltr
Copy link

Body parsing does not seem to work in solidstart production builds with bun (works with node): not sure if it is a bun or solidstart bug. Example code:

export const POST = async (event: APIEvent) => {
  console.log(await event.request.json());
  return new Response('ok');
};

The request hangs forever, instead of resolving.
cc: @birkskyum

@birkskyum
Copy link
Collaborator

If it works in node, it's to be considered a bug in bun - rule of thumb

@itsyoboieltr
Copy link

itsyoboieltr commented Jan 5, 2024

If it works in node, it's to be considered a bug in bun - rule of thumb

Unless, they are doing some if-else thing specifically to handle bun, which has a bug :) Since nitro seems to have a specific bun adapter and preset, I would assume those have a bug somewhere, since it is not node code that is running.

@birkskyum
Copy link
Collaborator

Good point :)

@itsyoboieltr
Copy link

itsyoboieltr commented Jan 5, 2024

I am suspecting it is a h3 bug (or some h3 bun compatibility issue) since SolidStart uses h3 for api calls.
Reproduction of the issue with Bun: solidstart-post-repro
Issue opened for Vinxi (that makes builds for SolidStart): nksaraf/vinxi#95

@birkskyum
Copy link
Collaborator

Wonder if related

https://twitter.com/jarredsumner/status/1782693859975373187

@paulo-assoc
Copy link

paulo-assoc commented Apr 26, 2024

After upgrading to bun v1.1.5, solid-start notes sample app just hangs when the first http request comes in (bun run --bun). No errors in the console this time.

Screenshot 2024-04-26 113050

@birkskyum
Copy link
Collaborator

birkskyum commented Apr 30, 2024

I have a weird bug with bun not being able to perform the vinxi build if the code use some files from the public folder, as those can not be found in the build step.

$ bunx --bun vinxi build

⚙  Preparing app for bun...

 ERROR  { [ENOENT: No such file or directory]                                                                               3:09:45 PM
  code: 'ENOENT',
  path:
   '[absolute path]/public/.../scene.bin',
  syscall: 'copyfile',
  errno: -2 } 



 ERROR  No such file or directory                                                                                           3:09:45 PM

 ELIFECYCLE  Command failed with exit code 1.
 ```

@paulo-assoc
Copy link

paulo-assoc commented May 3, 2024

Every release of bun fails differently when testing with the same solid-start notes sample app. After upgrading to bun v1.1.7, the server side now throws an http 500 error when trying to save a new note. No errors in the console this time. Ran on Windows 11.

image

@paulo-assoc
Copy link

paulo-assoc commented May 10, 2024

Solid-start notes sample app still fails with Bun v1.1.8 with this output in the console (when trying to save a new note):

bun run --bun dev
$ vinxi dev --port 3004
vinxi v0.3.11
vinxi starting dev server

➜ Local: http://localhost:3004/
➜ Network: use --host to expose

[h3] [unhandled] 1 | export default "native";
^
error: Unexpected end of JSON input
at json (native:1:1)

1 | export default "native";
^
SyntaxError: Unexpected end of JSON input
at json (native:1:1)

@birkskyum
Copy link
Collaborator

birkskyum commented May 30, 2024

Seems like this is the last piece missing now for initial support:

➜ bun run --bun dev
$ vinxi dev
vinxi v0.3.11
vinxi starting dev server

  ➜ Local:    http://localhost:3000/
  ➜ Network:  use --host to expose

12:46:32 AM [vite] ✨ new dependencies optimized: marked
12:46:32 AM [vite] ✨ optimized dependencies changed. reloading
[h3] [unhandled] 1 | export default "native";
    ^
error: Unexpected end of JSON input
      at json (native:1:1)

1 | export default "native";
    ^
SyntaxError: Unexpected end of JSON input
      at json (native:1:1)

@paulo-assoc
Copy link

Thanks, @birkskyum. Perhaps you can create a new issue with a more specific than "Support SolidStart". This worked great with #11260.

@birkskyum
Copy link
Collaborator

I'll try to see if I can get more out of the debug build of the bun binary

@birkskyum
Copy link
Collaborator

birkskyum commented May 30, 2024

The bun-debug outputs lots of things, but ends up with this failed assertion when saving a new note:

[SYS] onUpdate kevent (fd: 36) Reader
[SYS] onPoll(36) = 33
[SYS] recv(36, 262144) = 33 0.013ms
[SYS] recv(36, 262111) = EAGAIN 0.006ms
[SYS] register: FilePoll(0x20000de0100, generation_number=8) readable (36)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(35, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 8 - 0 = 8
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=42, generation_number=11) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 42) Reader
[SYS] onPoll(42) = 33
[SYS] recv(42, 262144) = 33 0.014ms
[SYS] recv(42, 262111) = EAGAIN 0.006ms
[SYS] register: FilePoll(0x20022280060, generation_number=11) readable (42)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(41, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 1 - 0 = 1
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=7, generation_number=3) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 7) Reader
[SYS] onPoll(7) = 33
[SYS] recv(7, 262144) = 33 0.082ms
[SYS] recv(7, 262111) = EAGAIN 0.007ms
[SYS] register: FilePoll(0x20000de0060, generation_number=3) readable (7)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(6, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 8 - 0 = 8
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=36, generation_number=8) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 36) Reader
[SYS] onPoll(36) = 33
[SYS] recv(36, 262144) = 33 0.016ms
[SYS] recv(36, 262111) = EAGAIN 0.008ms
[SYS] register: FilePoll(0x20000de0100, generation_number=8) readable (36)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(35, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 8 - 0 = 8
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=42, generation_number=11) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 42) Reader
[SYS] onPoll(42) = 33
[SYS] recv(42, 262144) = 33 0.018ms
[SYS] recv(42, 262111) = EAGAIN 0.019ms
[SYS] register: FilePoll(0x20022280060, generation_number=11) readable (42)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(41, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 1 - 0 = 1
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=7, generation_number=3) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 7) Reader
[SYS] onPoll(7) = 33
[SYS] recv(7, 262144) = 33 0.014ms
[SYS] recv(7, 262111) = EAGAIN 0.023ms
[SYS] register: FilePoll(0x20000de0060, generation_number=3) readable (7)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(6, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 8 - 0 = 8
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=36, generation_number=8) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 36) Reader
[SYS] onPoll(36) = 33
[SYS] recv(36, 262144) = 33 0.015ms
[SYS] recv(36, 262111) = EAGAIN 0.007ms
[SYS] register: FilePoll(0x20000de0100, generation_number=8) readable (36)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(35, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 8 - 0 = 8
[FileReader] onPull(16384) = pending
[SYS] onKQueueEvent: FilePoll(fd=42, generation_number=11) = poll_readable | readable | one_shot | has_incremented_poll_count | was_ever_registered | socket
[SYS] onUpdate kevent (fd: 42) Reader
[SYS] onPoll(42) = 33
[SYS] recv(42, 262144) = 33 0.017ms
[SYS] recv(42, 262111) = EAGAIN 0.007ms
[SYS] register: FilePoll(0x20022280060, generation_number=11) readable (42)
[FileReader] onReadChunk() = 33 (drained)
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[SYS] send(41, 13) = 13
[FileSink] onWrite(13, src.io.PipeWriter.WriteStatus.drained)
[Loop] sub 1 - 0 = 1
[FileReader] onPull(16384) = pending
[RequestContext] create (src.bun.js.api.server.NewRequestContext(false,true,src.bun.js.api.server.NewServer(ZigGeneratedClasses.JSDebugHTTPServer,false,true))@200077d0100)
[alloc] new() = src.bun.js.api.Timer.TimerObject@13c904140
[alloc] destroy() = src.bun.js.api.Timer.TimerObject@16e004080
[RequestContext] toAsync
[RequestContext] onBufferedBodyChunk 376 true
[EventLoop] enter() = 0
[BodyValue] resolve
[EventLoop] exit() = 0
[EventLoop] enter() = 0
[EventLoop] exit() = 0
[h3] [unhandled] 1 | export default "native";
    ^
error: Unexpected end of JSON input
      at json (native:1:1)
      at asyncFunctionResume (:2:22)
      at promiseReactionJobWithoutPromiseUnwrapAsyncContext (:2:22)
      at promiseReactionJob (:2:22)
      at native:1:1

1 | export default "native";
    ^
SyntaxError: Unexpected end of JSON input
      at json (native:1:1)
      at asyncFunctionResume (:2:22)
      at promiseReactionJobWithoutPromiseUnwrapAsyncContext (:2:22)
      at promiseReactionJob (:2:22)
      at native:1:1

@paulo-assoc
Copy link

@birkskyum What build of Bun did you test with?

@birkskyum
Copy link
Collaborator

birkskyum commented May 30, 2024

Main branch, bun-debug, and I just build it with this guide https://bun.sh/docs/project/contributing

1.1.10-debug+323011980

@birkskyum
Copy link
Collaborator

birkskyum commented Jun 8, 2024

All those "EAGAIN" doesn't look that healthy either, and that's even before clicking the save button.

Related

@birkskyum
Copy link
Collaborator

birkskyum commented Jun 8, 2024

Latest commit on main looks like this:

[Subprocess] updateHasPendingActivity() true - true
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/routing.js) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/routing.js) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/routing.js])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/utils.js) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/utils.js) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/utils.js])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/routing.js) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/routing.js) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/@solidjs/router/dist/routing.js])
[napi] napi_get_value_bool
[napi] napi_create_promise
[napi] napi_create_string_utf8: napi_rs_async_work
[napi] napi_create_async_work
[napi] napi_queue_async_work
[Loop] ref 1000 + 1 = 1001
[napi] napi_get_value_bool
[napi] napi_create_promise
[napi] napi_create_string_utf8: napi_rs_async_work
[napi] napi_create_async_work
[napi] napi_queue_async_work
[Loop] ref 1001 + 1 = 1002
[FileReader] onPull(16384) = pending
[napi] napi_resolve_deferred
[napi] napi_delete_async_work
[Loop] sub 10 - 1 = 9
[napi] napi_resolve_deferred
[napi] napi_delete_async_work
[Loop] sub 9 - 1 = 8
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/dist/server.js) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/dist/server.js) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/dist/server.js])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/dist/package.json) = -1
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/package.json) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/package.json) = 38
[SYS] fstat(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/package.json]) = 0
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/package.json], 1331) = 1315 (0.011ms)
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/package.json], 16) = 0 (0.002ms)
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/solid-js/store/package.json])
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json])
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json) = 38
[SYS] fstat(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json]) = 0
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json], 158102) = 158086 (0.016ms)
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json], 16) = 0 (0.002ms)
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/package.json])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/index.mjs) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/index.mjs) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/date-fns/index.mjs])
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json])
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json) = 38
[SYS] fstat(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json]) = 0
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json], 3581) = 3565 (0.003ms)
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json], 16) = 0 (0.002ms)
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/lib/marked.esm.js) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/lib/marked.esm.js) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/lib/marked.esm.js])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/lib/package.json) = -1
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json) = 38
[SYS] fstat(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json]) = 0
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json], 3581) = 3565 (0.003ms)
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json], 16) = 0 (0.001ms)
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/marked/package.json])
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json])
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json) = 38
[SYS] fstat(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json]) = 0
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json], 4056) = 4040 (0.003ms)
[SYS] read(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json], 16) = 0 (0.001ms)
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/package.json])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/dist/index.mjs) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/dist/index.mjs) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/dist/index.mjs])
[SYS] stat(/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/drivers/fs-lite.mjs) = 0
[SYS] openat(-2, /Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/drivers/fs-lite.mjs) = 38
[SYS] close(38[/Users/admin/repos/bun-kitchensink/nodtes/node_modules/unstorage/drivers/fs-lite.mjs])
[h3] [unhandled] 1 | export default "native";
    ^
error: Unexpected end of JSON input
      at json (native:1:1)
      at asyncFunctionResume (:1:11)
      at promiseReactionJobWithoutPromiseUnwrapAsyncContext (:1:11)
      at promiseReactionJob (:1:11)
      at native:1:1

1 | export default "native";
    ^
SyntaxError: Unexpected end of JSON input
      at json (native:1:1)
      at asyncFunctionResume (:1:11)
      at promiseReactionJobWithoutPromiseUnwrapAsyncContext (:1:11)
      at promiseReactionJob (:1:11)
      at native:1:1

@paulo-assoc
Copy link

Nice sleuthing, @birkskyum! How much closer does this get us to a resolution?

@birkskyum
Copy link
Collaborator

birkskyum commented Jun 8, 2024

Not so much unfortunately, but at least it seems like things are changing, and because all PRs have tests associated with them hopefully in a good direction. I mainly add the stacktraces, because they are searchable, like in the case of the "EAGAIN" which might have given us an open ticket to an issue which might be causing some sort of crash even before we click the "save note" button and see the JSON error. It looks file read/write related, and I see work being done in that area which is why I wanted to see what/if anything changed today.

@paulo-assoc
Copy link

I appreciate what you're doing, @birkskyum! Was your test today using the latest canary build?

@birkskyum
Copy link
Collaborator

Yes, it was using the latest commit from main (1.1.13-debug+60af98586) so that should be the same.

@BierDav
Copy link

BierDav commented Jun 10, 2024

Hi there! From the last messages I didn't really pickup the current status. Is it currently possible to start a simple Hello World app? I would really appreaciate solid start support!

@birkskyum
Copy link
Collaborator

@BierDav , your milage might vary here, but a simple Hello World should be possible. The notes starter example that is breaking use some of the more advanced features like single-flight mutations.

@BierDav
Copy link

BierDav commented Jun 10, 2024

@birkskyum, thanks for your fast answer! I wanted to ask how to get this working, because the ´bun create` doesn't currenty work. I have already created an issue for that solidjs/solid-start#1535

@birkskyum
Copy link
Collaborator

birkskyum commented Jun 10, 2024

Use pnpm/npm create solid, and then when the project is created, delete any pnpm/npm lockfile / node_modules and run bun install.

@BierDav
Copy link

BierDav commented Jun 10, 2024

Ok thanks, that worked. But is it also possible to use bun as a vinxi replacement too?

@birkskyum
Copy link
Collaborator

birkskyum commented Jun 10, 2024

@BierDav , not that isn't possible at this time. Vinxi was actually inspired/influenced by the idea of "Bun.App", but i don't think that API has been released.

@paulo-assoc
Copy link

Not unexpected, but with Bun 1.1.13 still getting 'SyntaxError: Unexpected end of JSON input' when saving a new note in the SolidStart Notes sample app.
image

@birkskyum
Copy link
Collaborator

birkskyum commented Jun 27, 2024

In summary, these are the issues related to SolidStart that users are highly likely to run into:

@paulo-assoc
Copy link

Thanks, @birkskyum! These need 'bug' and 'triage' labels.

@znycheporuk
Copy link

with #2644 closed, Bun 1.1.27 works fine with SolidStart in my case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tracking An umbrella issue for tracking big features
Projects
None yet
Development

No branches or pull requests

10 participants