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

Does not work on windows / global npm installation #235

Open
hediet opened this issue Mar 15, 2024 · 7 comments
Open

Does not work on windows / global npm installation #235

hediet opened this issue Mar 15, 2024 · 7 comments
Labels
question Further information is requested

Comments

@hediet
Copy link

hediet commented Mar 15, 2024

I like the idea of this extension! Unfortunately, I didn't manage to get it working.

5x2ckzh57i

Version: 1.88.0-insider (user setup)
Commit: be210b3a60c7d60030c1d3d92da00d008edf6ab9
Date: 2024-03-15T05:48:19.790Z
Electron: 28.2.6
ElectronBuildId: 27476517
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

Code_-_Insiders_GQMp8C1F7T

@HerringtonDarkholme
Copy link
Member

Using pwsh may be the problem. Would you like install it via cmd? by default the command is ast-grep.exe on windows.
you can tweak it via https://github.com/ast-grep/ast-grep-vscode?tab=readme-ov-file#extension-settings

@HerringtonDarkholme HerringtonDarkholme added the question Further information is requested label Mar 15, 2024
HerringtonDarkholme added a commit that referenced this issue Mar 18, 2024
@hediet
Copy link
Author

hediet commented Mar 18, 2024

I think npm/yarn just don't generate any .exe files. Neither for PWSH nor CMD.

Code_-_Insiders_Sesd5KgYZE

@HerringtonDarkholme
Copy link
Member

It should be fixed in 0.1.3! Thanks for reporting!

@hediet
Copy link
Author

hediet commented Mar 28, 2024

Still does not work :/
image

Also, when I click x in that dialog, it wants to open a website, which is quite annoying.

@HerringtonDarkholme
Copy link
Member

weird, @hediet would you like to confirm if this is caused by VSCode not picking up npm?

Say, you can change the serverPath to the absolute path to ast-grep binary installed globally? Thanks!

@HerringtonDarkholme
Copy link
Member

I tried on my windows machine by installing nodejs via its official website.
then I installed npm install @ast-grep/cli -g in the vanilla command prompt.
I did find some issues about vcruntime140.dll but after I installed vc redistribution package the DLL is okay.

Then ast-grep vscode can work properly.

image

@hediet
Copy link
Author

hediet commented Apr 3, 2024

Code_-_Insiders_T2r5wbNpUr

Code_-_Insiders_wujghlu60n

I suggest to show more error details, so that debugging is easier.

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

No branches or pull requests

2 participants