-
Notifications
You must be signed in to change notification settings - Fork 10
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
in vscode extension on windows, I get 'D2.<command>' not found #74
Comments
related: #73 |
I can't reproduce this issue on my machine, are you able to reproduce this on windows @BarryNolte ? |
@imding if you use vscode menubar |
@gavin-ts I'm not seeing anything. I built the vsix based on master and installed it, no obvious problems on Windows or Linux. I brought up dev tools and didn't see anything there either. Next bit of troubleshooting is, what extensions are installed (@imding . @quixoticaxis)? And what version of vscode, there was just an update. |
I'm using the latest Windows VSCode version (1.77.1). |
@BarryNolte I wonder if it is related to the esmoduleinterop change, and if this could fix it: 15d75d6 . but until we can reproduce the issue we won't be able to confirm the fix. |
@gavin-ts This seems to be a likely culprit. The only time I've had extensions fail to load, it's something like an imported module failing to load. |
This looks like a similar issue: microsoft/vscode-go#1386 (comment) |
Maybe, but given the bug is 5 years old, I don't know. How about we try the change you made, and if it still works in our machines, at least we know it wasn't made worse. |
ok we can see if it is fixed in 0.8.5 |
@gavin-ts 0.8.5 still does not work the same as 0.8.4 (URL path must be absolute). |
Extension works on Linux for me, so something is probably OS related. I'm currently on Windows 11 (10.0.22621.1485). |
did 0.8.4 work on linux for you as well? @quixoticaxis |
@alixander 0.8.3, 0.8.4, and 0.8.5 work on my Kubuntu (latest stable). |
It all works on my win10 machine, so win11 related? |
Disclaimer: I know literally zero javascript.
Hope it helps. |
Excellent, now I have something to go on! I'll see if my current hunch is correct. Thanks! |
It's the open module that I added to open links in the preview window trying get the path to the 'xdg-open' script for linux, on a windows machine. This module had a note about not really working in electron apps, so I guess this is the subtle hint to not use it. Going off to find alternatives... |
The error is originated from this file: And I found that it contains a literal string pointing to an invalid path (on Windows) const $e = i.dirname((0, s.fileURLToPath)("file:///Users/gavinnishizawa/github_repos/d2-vscode/node_modules/open/index.js")) Simply edit that string to: const $e = i.dirname((0, s.fileURLToPath)("file://./node_modules/open/index.js")) And it now works |
Might be related to this https://github.com/sindresorhus/open/blob/accd304abffaec9016f180496d4d3de40145b3c9/index.js#L14 |
This fixed it for me! 👍 |
The noted fix worked for me too |
thanks everyone version 0.8.6 is released and should fix this issue |
we'll close this once someone can confirm. @Rhywun @therastal @vittee @quixoticaxis @imding |
@gavin-ts , @alixander , thank you. 0.8.6 works. |
great. thanks @BarryNolte ! |
Same for me! |
sorry for completely dropping out on the thread. I only had this issue on windows, will check asap, and thanks so much for fixing it!! |
it works! |
it happens whenever I try to preview or compile to svg.
The text was updated successfully, but these errors were encountered: