Closed smlombardi closed 1 year ago
Seeing the same thing on Windows 11 21H2 on 1.60.0-insider except Code doesn't lock up when I dismiss the error.
Hey folks. Sorry about that. Like I mentioned on the ReadMe, I have no means to support Mac at this point (as I don't have one to test it out). But I might be able to fix it, depending on the issue. Can any of you open Dev Tools before running the command and get the error on the console there?
mainThreadExtensionService.ts:95 Activating extension 'leandro-rodrigues.fluent-ui-vscode' failed: Cannot read property 'replace' of undefined.
$onExtensionActivationError @ mainThreadExtensionService.ts:95
Running Enable doesn't produce any new errors in the console.
Thanks @gyroknight, it seems that the extension is failing to find the workbench.html
file, which it needs in order to inject the new styles.
(BTW, I'm also using W11 21H2 and I used it while working on the extension, so I'm sure is not the OS)
The code is looking for that file using the following path
C:\Users\%USERPROFILE%\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\code\electron-browser\workbench
My assumption is that the Insiders' path doesn't match, causing the error.
I'll have a look at the options on supporting Insiders.
VSCode defines the environment variable Looks like the issue is with VSCODE_CWD
, probably better to use that instead of hardcoding the path.showWhatsNewPage()
and using this.cntx.extensionPath
in asWebviewUri()
, the What's New page fails to show, which prevents the Enable and Disable from registering correctly. Commenting out showWhatsNewPage()
causes the extension to function like before.
Hm, interesting. I wonder what's causing it causing to fail though. I was actually thinking about disabling the What's New page as it is just another thing to keep updated. Is nice and all but not that important.
Edit: Went looking and yeah, it appears that it fails to find the index.html
file and that causes it to fail in this line
OK, just did a new release with changes to the path resolution method. You should get the update soon. Have a go and see if that works for you now.
@TheOld
I don't know if this is related at all, at least I don't get the same error, but I cannot enable fluent ui on my mac either
Here is the error in the devtools
mainThreadExtensionService.ts:113
Activating extension 'leandro-rodrigues.fluent-ui-vscode' failed:
Something went wrong installing the "sharp" module
Cannot find module '../build/Release/sharp-darwin-arm64v8.node'
Require stack:
- /Users/royalfoxy/.vscode-insiders/extensions/leandro-rodrigues.fluent-ui-vscode-3.9.0/node_modules/sharp/lib/sharp.js
- /Users/royalfoxy/.vscode-insiders/extensions/leandro-rodrigues.fluent-ui-vscode-3.9.0/node_modules/sharp/lib/constructor.js
- /Users/royalfoxy/.vscode-insiders/extensions/leandro-rodrigues.fluent-ui-vscode-3.9.0/node_modules/sharp/lib/index.js
- /Users/royalfoxy/.vscode-insiders/extensions/leandro-rodrigues.fluent-ui-vscode-3.9.0/out/extension.js
- /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/vs/loader.js
- /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-amd.js
- /Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/out/bootstrap-fork.js
-
Possible solutions:
- Install with verbose logging and look for errors: "npm install --ignore-scripts=false --foreground-scripts --verbose sharp"
- Install for the current darwin-arm64v8 runtime: "npm install --platform=darwin --arch=arm64v8 sharp"
- Consult the installation documentation: https://sharp.pixelplumbing.com/install.
$onExtensionActivationError @ mainThreadExtensionService.ts:113
N @ rpcProtocol.ts:455
M @ rpcProtocol.ts:440
H @ rpcProtocol.ts:370
G @ rpcProtocol.ts:296
(anonymous) @ rpcProtocol.ts:161
invoke @ event.ts:862
deliver @ event.ts:1075
fire @ event.ts:1031
fire @ ipc.net.ts:671
ee.onmessage @ localProcessExtensionHost.ts:583
Just tell me if you need any more information!
Could get it to work by installing the node_modules on my machine. When installing sharp only the platform specific .node file is downloaded and thus no darwin or linux compatibility. I wonder tho why it already includes the node_modules folder with the windows node file...
The problem have already decided? Or not?
@Fishka17 What do you mean?
This plugin doesn’t work on my Mac. I get this error
@Fishka17 as I already stated in my comment before, you can just install the node_modules of the extension. Go to your home in the shell, cd into .vscode
or .vscode-insiders
, then into extensions, search for this extension and cd into it's directory. Remove the node_modules folder and do a npm i
to install the packages again. It's likely that something went wrong when publishing this extension and the node_modules folder was published aswell.
@Fishka17 as I already stated in my comment before, you can just install the node_modules of the extension. Go to your home in the shell, cd into
.vscode
or.vscode-insiders
, then into extensions, search for this extension and cd into it's directory. Remove the node_modules folder and do anpm i
to install the packages again. It's likely that something went wrong when publishing this extension and the node_modules folder was published aswell.
Thanks! It's worked.
Hello, I have the same error, I opened the extensions folder, node_modules was not there, I ran npm I
, rebooted vs code, tried to run Fluent Ul:Enable
, but got the same error
@artemki2077 have you deleted the node_modules folder before doing an npm i
?
@RoyalFoxy Yes, after deleting the node_modules folder, do npm install.
@RoyalFoxy yes, I deleted the node_modules folder
I'm sorry, I cannot help you with that without more context. What have you tried and what have you done sofar? And have you also tried uninstalling the extension and deleting its folder entirely and then reinstalling it afternoon?
ok, I downloaded the extension then, tried to activate "Fluent UI: Enable" but got "command 'fluent-ui-vs code.enableEffects' not found", then opened the folder with this extension deleted the node_modules folder, ran the command "npm i", reopened vs code got the same error, then tried reload the computer but the result is the same
No clue then what's wrong
installed extension on Mac OS 11.4 to version: 1.60.0-insider.
run the command in the docs and I get this error
And then Code locks up and i need to force quit