srcbookdev / srcbook

TypeScript notebook for rapid prototyping
https://srcbook.com
Apache License 2.0
1.93k stars 51 forks source link

Unhandled 'error' event #314

Open Horadrim opened 8 hours ago

Horadrim commented 8 hours ago

Steps to reproduce:

  1. Globally install srcbook with npm
  2. Start the application
  3. Click "Create Srcbook"
  4. Upon writing a new title or pasting / writing any code, the application crashes.

Console output:

` Srcbook
Serving static files (React app)... Creating WebSocket server... Initialization complete srcbook@0.0.6 running at http://localhost:2150 node:events:497 throw er; // Unhandled 'error' event ^

Error: spawn npx ENOENT at ChildProcess._handle.onexit (node:internal/child_process:286:19) at onErrorNT (node:internal/child_process:484:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) Emitted 'error' event on ChildProcess instance at: at ChildProcess._handle.onexit (node:internal/child_process:292:12) at onErrorNT (node:internal/child_process:484:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn npx', path: 'npx', spawnargs: [ 'tsserver' ] }

Node.js v20.16.0 `

benjreinhart commented 8 hours ago

Hmm, I cannot seem to reproduce. I'm on mac, using chrome, deleted all my srcbook files (so, clean slate) and then ran:

npm i -g srcbook
srcbook start

This installed and booted srcbook@0.0.6.

I created a srcbook, entered a title, no crash. Then I tried writing code (without installing deps), no crash.