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

Starting vitale server fails on vscode windows #54

Open
bmerkle opened this issue Sep 26, 2024 · 6 comments
Open

Starting vitale server fails on vscode windows #54

bmerkle opened this issue Sep 26, 2024 · 6 comments

Comments

@bmerkle
Copy link

bmerkle commented Sep 26, 2024

Hi again

i ran vitale sucessfully on github codespaces 👍
vitale is really cool and i like it 💯

i tried it also on my vscode windows installation but it fails to start the vitale server.
I followed the instructions in https://github.com/githubnext/vitale?tab=readme-ov-file#installation
but i get a error message (please see screenshot attached)

How can i fix this ?
Maybe this is a plattform dependend issue (e.g. / vs \ in the path) ?

In the console output the message is:

rejected promise not handled within 1 second: Error: spawn node_modules/.bin/vitale ENOENT
stack trace: Error: spawn node_modules/.bin/vitale ENOENT
    at Process.ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at processTicksAndRejections (node:internal/process/task_queues:82:21)

image

@bmerkle
Copy link
Author

bmerkle commented Sep 26, 2024

I tried to start manually but vscode seems to ignore the running server

PS C:\work\githubnext\vitale\node_modules.bin> .\vitale.ps1
(!) Could not auto-determine entry point from rollupOptions or html files and there are no explicit optimizeDeps.include patterns. Skipping dependency pre-bundling.

and launch.json does not contain the path to vitale.ps1 which is strange
launch.json

@jaked
Copy link
Collaborator

jaked commented Sep 26, 2024

thank you for the report!

I haven't tested this on Windows at all so it is probably a path issue (see https://github.com/githubnext/vitale/blob/main/packages/vscode/src/controller.ts#L105). Unfortunately I'm not able to work on this (I don't have a Windows setup) but I would be grateful for a patch if you would like to submit one.

There's not currently a way for the VS Code extension to connect to a server started externally (this would be a nice option to add); it always tries to start one and connect to it. launch.json doesn't contain the server path because the extension looks for it in node_modules.

@bmerkle
Copy link
Author

bmerkle commented Sep 26, 2024

ok thanks for the info. I will try to fix it and submit a PR

@goodchengwang
Copy link

i have same error

bmerkle added a commit to bmerkle/vitale that referenced this issue Oct 7, 2024
@bmerkle
Copy link
Author

bmerkle commented Oct 7, 2024

Hi @jaked, here is a small patch which handles the OS dependencies.
Unfortunately i could not test it because debugging/starting does not yet work in my setup/environment.

therefor i have three questions:

  • I understand, that i can debug a VSCode plugin via F5. (two instances of VSCode are started, one host and one for the plugin). It this the right way to debug ? (https://vscode-docs.readthedocs.io/en/stable/extensions/debugging-extensions)

  • I would assume that the server is started dynamically in the debugger, but according to your description in
    https://github.com/githubnext/vitale?tab=readme-ov-file#development
    it seems that I have to explicitly start the server (run Vitale: Restart Kernel from the command palette)... I am confused

  • in the doc you also say that we have to link the server to the example
    cd packages/server; pnpm link --dir $YOURPROJECT
    do i have to use / or \ in the path and absolute or relative path ?
    i mean in our example we link it to the examples directory and not the example file, right

If we add a bit more info here, I am sure i get a running setup to debug and develop more PR for vitale :-)

@jaked
Copy link
Collaborator

jaked commented Oct 25, 2024

hi @bmerkle sorry I didn't reply sooner (I'm no longer at GitHub 😢 but I'm still a contributor to Vitale).

  1. yes, that's how I normally develop Vitale
  2. the server is started by the Vitale extension, you don't need to start it explicitly (but if you make server changes, you need to manually restart with the Restart Kernel command)
  3. for the examples project you don't need to link, it's already done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants