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

LESS parsing completely broken #1665

Closed
sirockin opened this issue Nov 21, 2014 · 26 comments
Closed

LESS parsing completely broken #1665

sirockin opened this issue Nov 21, 2014 · 26 comments

Comments

@sirockin
Copy link

On creating and opening a .less file:
1/ Preview pane shows message: "Compilation Error occurred (see error list to navigate to the error location):"
2/ .css file does not get generated
3/ Error list remains empty

Choosing Web Essentials | Re-compile all Less Files (Alt-Sh-Y) also fails to generate .css.

This worked for me in previous versions. Now it has completely broken my project!

Web Esssentials V2.5.2
Microsoft Visual Studio Professional 2013
Version 12.0.31101.00 Update 4
Microsoft .NET Framework
Version 4.5.50938

@sirockin
Copy link
Author

This seems to be a common problem as it has also been reported here:
https://visualstudiogallery.msdn.microsoft.com/56633663-6799-41d7-9df7-0f2a504ca361/view/Discussions

@emrekilinc
Copy link

Same here, all my existing projects are broken because of this update.. Still searching for a fix

@tgadsden
Copy link

I was having this problem too after updating to version 2.5.2 this morning. I ended up uninstalling Web Essentials from the Extensions and Updates manager, restarting Visual Studio and then manually downloading and installing the 2.5 installer (.vsix file) from here: https://github.com/madskristensen/WebEssentials2013/releases/tag/v2.5. When I next loaded up Visual Studio, the LESS editor was working for me again.

@macgyver76
Copy link

Same here, unfortunately. Now I'm back to 2.5 version.

@codepic
Copy link

codepic commented Nov 21, 2014

@tgadsden your "fix" works for us too.

@sirockin
Copy link
Author

@tgadsden thanks, rolling back to 2.5 worked for me too.

@rjgotten
Copy link

Same here.

Mads should really get someone to test his stuff properly before he pushes through broken release after broken release.

@codepic
Copy link

codepic commented Nov 21, 2014

I have a hunch that this has something to do with the recent inclusion of .weignore rules into the LESS compilation + the Tools > Options > Web Essentials > General > WE Ignore > Show ignore logs > False

2.5 Does tell (against the aforementioned setting) when a .less file is ignored whereas 2.5.2 will simply error out with no logs what so ever.

@rjgotten
Copy link

@codepic
I'm not using any .weignore rules in any of my projects. I have everything switched off globally except for the LESS compilation preview window, which is all I need Web Essentials for.
I still have this problem.

@emrekilinc
Copy link

@tgadsden Thanks, your fix works. 👍

@iamkrillin
Copy link
Contributor

I tracked down a way to fix this with the current version of WE (the issue is due to either NodeJS not being packed right or extracted right - not sure which). So to fix this simply reinstall node and set the modules back up

  • Locate the path where WE is installed
    • Should be something like C:\Users$username\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\12.0\Extensions$random folder
  • Run the commands necessary to reinstall node & set the modules back up
    • I made a powershell script to do this for you open powershell and run
iex ((new-object net.webclient).DownloadString('https://gist.githubusercontent.com/iamkrillin/e5e95f0193eef4358e09/raw/6dcf83b0620f2fe9850ae456f6e1bed629816862/we.ps1'))

You can view the script here. https://gist.github.com/iamkrillin/e5e95f0193eef4358e09#file-we-ps1

@dealdiane
Copy link

@iamkrillin Your script works. Thanks. Only thing though is at line 22 the "node.exe" needs to be "\node.exe" or it stores the downloaded node.exe in nodejs\toolsnode.exe and breaks the rest of the script.

@iamkrillin
Copy link
Contributor

@Opiants thanks for pointing that out.. Not sure how I missed that.

@macgyver76
Copy link

@iamkrillin As @Opiants said - your script works, but... (there's always but) when I'm trying to save .less file I've got in output: "LESS: Compiling Site.less" message and basically nothing else happens from that point. I need to roll back to 2.5 version again. (:

@iamkrillin
Copy link
Contributor

@macgyver76 I updated the script, turns out I was not writing the "package.json" during the script.

@blowsie
Copy link
Contributor

blowsie commented Nov 24, 2014

Can we get this fix in the nightly?

@matthewpavkov
Copy link

@iamkrillin Your script worked for me, thanks. SASS is compiling once again.

@ericdc1
Copy link

ericdc1 commented Nov 24, 2014

I installed VS Update 4 and the latest Web Essentials and SCSS didn't complie on save. I tried iamkrillin 's powershell (with VS closed) and when I save a SCSS file I now get 11/24/2014 5:42:53 PM: Something went wrong reaching: http://127.0.0.1:39877/?service=SCSS&sourceFileName=%somelongpath&precision=5&outputStyle=expanded&sourceMapURL&
11/24/2014 5:42:53 PM: SCSS: StyleSheet1.scss compilation failed: The service failed to respond to this request

I removed the latest Web Essentials and installed 2.5 from https://github.com/madskristensen/WebEssentials2013/releases/tag/v2.5 and still get the same errors.

I appreciate Mads work on WE but it really sucks that my office wasted 4 people x 4 hours trying to fix our SASS compilation after updating WE. Anyone have any suggestions on how to fix?

@owen26
Copy link

owen26 commented Nov 25, 2014

Revert to version 2.5.1 solved this issue in my case.

@macgyver76
Copy link

@iamkrillin Thank you, sir. Believe it or not, it works right now.

@DiverseInternet
Copy link

Totally agree with rjgotten.

Web Essentials is well named - it's essential for any web developer using Visual Studio. However, it is never stable and there seem to be issues with every new release.

Microsoft should be including most of the Web Essentials functionality as standard in Visual Studio and make sure it is stable.

Currently is costing too much time in lost productivity getting it to work properly.

@AkosLukacs
Copy link

@OnenessUK "Microsoft should be including most of the Web Essentials functionality as standard in Visual Studio and make sure it is stable." - actually, they are including stuff from WE. Maybe just a bit slowly...

@Trapulo
Copy link

Trapulo commented Nov 25, 2014

same trouble. I agree that VS MAY provide this kind of features native.

@am11
Copy link
Contributor

am11 commented Nov 25, 2014

Actually, less v2.0 presented some breaking changes. I have made changes to conform with new API.

Yet, there is one source-map issue to fix. Details can be found at: less/less.js#2310.

Hopefully, it will be resolved soon. I will then push the code and we will have a new release.

/cc @madskristensen, @SLaks

@am11
Copy link
Contributor

am11 commented Nov 26, 2014

This is fixed by #1675.

@miketrionfo
Copy link

I just installed WE 2.5.3 and less is compiling now. Thanks @madskristensen for pushing the fix out quickly. Keep up the very useful work.

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

No branches or pull requests