oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
72.77k stars 2.64k forks source link

Support SolidStart #3736

Open paperdave opened 1 year ago

paperdave commented 1 year ago

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:

birkskyum commented 1 year ago

Repro:

Jarred-Sumner commented 1 year ago

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

birkskyum commented 1 year ago

Update for canary (hash 3418feb2)

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

birkskyum commented 1 year ago

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 commented 11 months ago

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 commented 11 months ago

Which adapter do you use?

quantuminformation commented 11 months ago

googles Node adapter

quantuminformation commented 11 months ago

any docs for adaptors?

birkskyum commented 11 months ago

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

quantuminformation commented 11 months ago
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 commented 11 months ago
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 commented 11 months ago

@marcusbuffett, I believe it's this ticket - it's not implemented:

marcusbuffett commented 11 months ago

@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 commented 10 months ago

my issue was fixed moving to node 18 from 16

birkskyum commented 8 months ago

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 on  vinxi [$!?] via ⬢ v18.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 commented 8 months ago

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 commented 7 months ago

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: https://github.com/oven-sh/bun/issues/267

birkskyum commented 7 months ago

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 commented 7 months ago

New versions seem to have fixed things here...

itsyoboieltr commented 7 months ago

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 commented 7 months ago

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

itsyoboieltr commented 7 months ago

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 commented 7 months ago

Good point :)

itsyoboieltr commented 7 months ago

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): https://github.com/nksaraf/vinxi/issues/95

itsyoboieltr commented 7 months ago

now post requests also work! It was fixed on their end in: https://github.com/solidjs/solid-start/pull/1255?fbclid=IwAR3uo6IrPCogXb-qZPUrLjiKc-WrCj_WFjKEVgJ617j9gX4SZihmNjlQbmE Now everything seems to be working with SolidStart (dev, build, prod), so I guess the issue can finally be closed.

birkskyum commented 7 months ago

The http2 server part is blocking for a lot of work with solid start apps as well as many other frameworks. It's not specific to this issue, but closing this before people confidently can use solid start does appear a bit too fast. I'd support closing it when it lands though.

birkskyum commented 5 months ago

Tested solid start 0.6.0 which is just out (release notes).

Bun also breaks for single flight mutations:

➜ bun create solid

select solid-start, with typescript, notes example

➜ bun install
➜ bun --bun run dev
$ vinxi dev
vinxi v0.3.4
vinxi starting dev server

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

1:01:59 AM [vite] ✨ new dependencies optimized: marked
1:01:59 AM [vite] ✨ optimized dependencies changed. reloading

Try to create a new note and save it - the server error is:

[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 commented 4 months ago

Hit some error with missing crypto Diffie–Hellman

paulo-assoc commented 4 months ago

With bun v1.1.3 (tested on Windows 11) I get this error when doing a "bun run --bun dev" on a SolidStart (v1.0 RC - Clown Town) project:

Segmentation fault at address 0x20 ???:?:?: 0x7ff7d1b2d621 in ??? (node.exe) ???:?:?: 0x7ff7d387d8b9 in ??? (node.exe) ???:?:?: 0x7ff7d212cd1f in ??? (node.exe) ???:?:?: 0x7ff7d21356a8 in ??? (node.exe) ???:?:?: 0x7ff7d208332e in ??? (node.exe) ???:?:?: 0x7ff7d20b6e0d in ??? (node.exe) ???:?:?: 0x7ff7d3802878 in ??? (node.exe) ???:?:?: 0x7ff7d1cb3cb7 in ??? (node.exe) ???:?:?: 0x7ff7d1d83b88 in ??? (node.exe) ???:?:?: 0x7ff7d37ce5da in ??? (node.exe) ???:?:?: 0x7ff7d16820c9 in ??? (node.exe) ???:?:?: 0x7ffd8bd8257c in ??? (KERNEL32.DLL) ???:?:?: 0x7ffd8d50aa47 in ??? (ntdll.dll)

paulo-assoc commented 4 months ago

And with the latest bun canary I get:

[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)

The same error as @birkskyum, but still happening in the latest bun canary as of April 10.

paulo-assoc commented 4 months ago

@paperdave @birkskyum You're our only hope!

birkskyum commented 4 months ago

Since the solid-start notes example runs fine with both Node pnpm run dev and Deno DENO_FUTURE=1 deno task dev this bug is highly likely to be found in Bun, and not in SolidStart, so at this point I'll leave it for the Bun team to debug further.

paulo-assoc commented 4 months ago

Thanks, @birkskyum! You're right. Jared said if something runs in node but not in bun, then it's a bug in bun.

birkskyum commented 4 months ago

One thing I did notice about this error is that it's only present in bun --bun run dev, but when making a build, and running it with bun --bun run .output/server/index.mjs, then the notes example works.

paulo-assoc commented 4 months ago

Very interesting find...

birkskyum commented 4 months ago

Wonder if related

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

paulo-assoc commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 2 months ago

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 commented 2 months ago

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

birkskyum commented 2 months ago

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

birkskyum commented 2 months ago

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 commented 2 months ago

@birkskyum What build of Bun did you test with?

birkskyum commented 2 months ago

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

1.1.10-debug+323011980

birkskyum commented 2 months ago

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

Related

birkskyum commented 2 months ago

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 commented 2 months ago

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

birkskyum commented 2 months ago

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.