-
Notifications
You must be signed in to change notification settings - Fork 216
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
Unhandled 'error' event #314
Comments
Hmm, I cannot seem to reproduce. I'm on mac, using chrome, deleted all my srcbook files (so, clean slate) and then ran:
This installed and booted I created a srcbook, entered a title, no crash. Then I tried writing code (without installing deps), no crash. |
@Horadrim Hmm, me to, I am on Ubuntu, using brave, working fine, not able to reproduce this issue |
I am getting the same error on Windows. I dug into it a bit and found its because of the difference in how windows handles the spawn call. it looks like it needs the option "shell" set to true for windows to be able to run tsserver: const child = spawn('npx', ['tsserver'], {
cwd: options.cwd,
shell: process.platform == 'win32',
}); unfortunately it seems like there may still be other issues as am still unable to successfully run typescript cell code even after that change. But hopefully this gives you all a good starting point to supporting windows as well if you decide to do so :) |
I forgot to mention that I'm using windows 11. I guess since the other guys can't reproduce it on Linux and Mac, seems to be a Windows only issue indeed. |
@Cam-Bread Windows TS code is under the work it's just some extra work with windows white spacing in validators and a few places left not using |
has this been resolved? im having the same issues on Windows npx srcbook@latest start |
Unfortunately windows support is not ready yet. We're working hard to ship a hosted version right now which will make Srcbook usable online making these platform issues less of a pain. |
Steps to reproduce:
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
`
The text was updated successfully, but these errors were encountered: