WebCompiler
WebCompiler copied to clipboard
sass.cmd is not recognized as an internal or external command
Installed product versions
- Visual Studio: VS 2022 (v 17.5.4)
- This extension: 1.14.11
Description
I'm getting this error when a *.scss file attempts to compile. "Error '"C:\Temp\WebCompiler1.14.11\node_modules.bin\sass.cmd"' is not recognized as an internal or external command, operable program or batch file. REDACTED C:\Users\redacted...\wwwroot\css\template.scss 0
I have attempted to un-install/re-install twice.
Steps to recreate
- Save change to template.scss or right-click and re-compile file.
Current behavior
I get the error message in Description above.
Expected behavior
The file should compile and generate template.css and template.min.css
I also did npm install -g sass I'm still getting the same error
Can you the following:
- Uninstall the Extension,
- Delete the Directory C:\Temp\WebCompiler1.14.11\
- Install the Extension
Let me know if that works.
@failwyn thanks for your reply. I actually got this sorted last week. I thought I posted the fix here. When the install completed there was a NODE_MODULES.cmd (the file name was something like that...it disappeared after it ran) file in the C:\Temp\WebCompiler1.14.11\ I ran that *.cmd and it put the necessary dependencies in the .bin folder. That resolved my issue.
Glad to hear it; it seems like there is a permissions issue that causes this to happen, do you run Visual Studio as Administrator?
I'm a local admin on the machine where Visual Studio ran, but I did/do not right-click VS and choose run as admin.