cssho / vscode-svgviewer

SVG Viewer for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=cssho.vscode-svgviewer
MIT License
67 stars 20 forks source link

No handler found for the command: 'svgviewer.open'. An extension might be missing an activation event. #16

Open hugonakamura opened 8 years ago

hugonakamura commented 8 years ago

I have installed the extension but I get this error message when I try to run the SVG viewer.

Any idea how can I configure svgviewer.open?

cssho commented 8 years ago

It's not reproducible on my machine. Could you please send me your enviroment ?

hugonakamura commented 8 years ago

sure! how do I do it?

cssho commented 8 years ago

Please send me following informations.

hugonakamura commented 8 years ago
cssho commented 8 years ago

Ummm... Your environment is the same as me. Try reinstall a extension or clone this repository and debug it

ItsOkayItsOfficial commented 6 years ago

Problem (in my case): Extension node_modules weren't being installed.

Bigger Problem: VS Code has become disconnected from your extensions living at %USERPROFILE%\.vscode\extensions\. So uninstalling and reinstalling the extension won't even work.

Solution: Uninstall and reinstall Visual Studio Code (don't worry, all of your settings and extensions will persist).

I was as well running into this problem even after I uninstalled, reloaded, and then reinstalled the extension.

So I cracked open the Dev Console to see if VS Code was throwing anything and sure enough ts.console was logging Error: Cannot find module 'sync-exec' when trying to load up the SVG Viewer.

Looking in the extensions node_modules %USERPROFILE%\.vscode\extensions\cssho.vscode-svgviewer-1.4.4\node_modules it was completely empty despite having just been reinstalled.

So I uninstalled the extension once more, but noticed that the %USERPROFILE%\.vscode\extensions\cssho.vscode-svgviewer-1.4.4 was still there. I figured this meant that VS Code was disconnected from its extensions path. So I uninstalled and reinstalled VS Code; then uninstalled, reloaded, and reinstalled SVG View. Checked the extension folder again and everything was populated correctly. Working now.