madskristensen / WebCompiler

Visual Studio extension for compiling LESS and Sass files
Other
451 stars 173 forks source link

Outdated version of can-i-use-light causes build to fail #447

Open benjaminjanic opened 4 years ago

benjaminjanic commented 4 years ago

Installed product versions

Description

If you use this great VisualStudio Nuget Package in the latest version you will get a build error in Visual Studio. The refrenced tool Browserslist causes the error because it says that caniuse-lite is outdated.

npm update might solve the issue, but not for those users that are new to WebCompiler and don't want to do npm update manually.

Steps to recreate

  1. Try to build a project with WebComplier integrated

Current behavior

Visual Studio cannot build, because an error is thrown.

Expected behavior

Info will be logged in Visual Studio's output window that Browslerliste detected an outdated can-i-use-lite version. It will still build. webcompiler-breaks-vs-build

SLOPapa commented 4 years ago

This seems to only happen when "autoPrefix" is true?

benjaminjanic commented 4 years ago

Yes that is true, but of course "autoPrefix" is a desired feature as well. If someone could "just" add the latest versions of Browserslist and caniuse-lite this would fix the issue.

Enritski commented 4 years ago

This is causing issues for me, too. I really need to be able to use autoPrefix with my SASS files.

DarthSonic commented 4 years ago

How can I update using package installer? Error is 'npm' is not recognized as an internal or external command,

tulbox commented 3 years ago

Just put the following into a powershell script (deletes the problematic node_module packages and then reinstalls them):

## Remove current version of caniuse-lite & browserlist
rm -r -fo $Home\AppData\Local\Temp\WebCompiler*\node_modules\caniuse-lite\
rm -r -fo $Home\AppData\Local\Temp\WebCompiler*\node_modules\browserlist\

## Install caniuse-lite and browserlist new versions in proper directory
cd $Home\AppData\Local\Temp\WebCompiler*
npm i caniuse-lite browserlist

## Popup to confirm installation completed
$wshell = New-Object -ComObject Wscript.Shell
$wshell.Popup("caniuse-lite & browserlist have been updated",0,"NPM Install Complete",0x0 + 0x40 + 0x1000)