Comments (16)
As I understand it, the problem applies to environments that do not have settings for autoprefixer.
Looks like this is related to autoprefixer
updates or something around it.
3.0.0
[email protected]
[email protected]
[email protected]
3.0.1
[email protected]
[email protected]
[email protected]
Most likely this is related to defaults
settings in the browserslist
.
With common settings this plugin works as expected:
// Place your settings in this file to overwrite default and user settings.
{
"autoprefixer.options": {
"browsers": [
"last 4 versions",
"ie >= 9",
"> 5%"
]
}
}
So, in this case, this is the correct behavior. Just add the settings for the autoprefixer
.
from vscode-autoprefixer.
I can confirm this fixes the issue. Thank you for explaining! :)
from vscode-autoprefixer.
I'm having the same issue with the same error. Is it possible to downgrade the extension on my machine?
Sure! To install the previous version, go to your extensions, click the little cog wheel icon on the Autoprefixer extension and choose "Install Another Version". I installed 3.0.0 and it works great on my machine.
from vscode-autoprefixer.
Sure, here's an example of the CSS I most often prefix with the extension:
.test {
display: flex;
flex-flow: row wrap;
justify-content: center;
align-items: center;
flex: 0 0 50%;
order: 3;
background: linear-gradient(to bottom, rgba(255, 183, 29, 0) 0%, rgba(255, 183, 29, .9) 65%, rgba(255, 183, 29, 1) 100%);
}
It doesn't make much sense but I've gathered all properties in one place. On neither of my machines I don't do any additional configuration to the extension. I use it as it is right after installation.
As for my files, they are simple CSS files. No post-processors, no webpack or anything like that.
Before updating to version 3.0.1 running autoprefixer on the CSS mentioned above gave me this result:
.test {
display: -webkit-box;
display: flex;
-webkit-box-orient: horizontal;
-webkit-box-direction: normal;
flex-flow: row wrap;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-align: center;
align-items: center;
-webkit-box-flex: 0;
flex: 0 0 50%;
-webkit-box-ordinal-group: 4;
order: 3;
background: -webkit-gradient(linear, left top, left bottom, from(rgba(255, 183, 29, 0)), color-stop(65%, rgba(255, 183, 29, .9)), to(rgba(255, 183, 29, 1)));
background: linear-gradient(to bottom, rgba(255, 183, 29, 0) 0%, rgba(255, 183, 29, .9) 65%, rgba(255, 183, 29, 1) 100%);
}
On version 3.0.1 running the autoprefixer doesn't add any prefixes and does no changes to the styles. They are left as in the first example.
If this is of any help, I'm running Windows 10 with updated VS Code.
from vscode-autoprefixer.
Thanks for the issue!
Do you have a problem when the option is enabled?
from vscode-autoprefixer.
Thank you for the quick reply!
I've enabled autoprefixer.findExternalAutoprefixer
and the output gives me this:
[Autoprefixer]
Error: Failed to load autoprefixer library. Please install autoprefixer in your workspace folder using **npm install autoprefixer** or globally using **npm install -g autoprefixer** and then run command again.
at c:\Users\ddawdler\.vscode\extensions\mrmlnc.vscode-autoprefixer-3.0.1\out\extension.js:2:1575513
I tried installing an autoprefixer globally using npm install -g autoprefixer
but the issue persists.
from vscode-autoprefixer.
Looks like a bug. I'll try to reproduce this on my machine. Most likely related to 7b09fa2
from vscode-autoprefixer.
@ddawdler, Can you share your configuration of the plugin and file that has the problem?
from vscode-autoprefixer.
I'm having the same issue with the same error. Is it possible to downgrade the extension on my machine?
from vscode-autoprefixer.
I am having the same issue. The downgrade suggested above — to 3.0.0 — was able to restore the functionality before the upgrade.
macOS: 10.15.4
VS Code: Version: 1.45.0
from vscode-autoprefixer.
Is it possible to use just "defaults" for the value in the "browsers" property? Or does the extension only work properly if you specify what browsers to target?
from vscode-autoprefixer.
I'm gonna sound like a total noob and say I still have no idea how to fix this:
what settings do I need to change? I don't have browserlist
settings.
in VS I tried to put the settings above in autoprefixer.option
of settings.json and/or in my workspace.json ...no luck
from vscode-autoprefixer.
I haven't had luck with not setting anything in the settings.json. I suggest checking this page for help on how to set up the extension.
Here's an example of the settings I use:
"autoprefixer.options": {
"browsers": [
"last 4 versions",
"ie >= 9",
"> 5%"
]
}
from vscode-autoprefixer.
hey, thank you... for whatever reason it worked this time.
if I can bother you more I have a question: I work solo so I don't have a lot of work-flow proper practices set up for me... I had to come up with my own, and they are probably wrong - I find compiling from sass and then autoprefixing, then beautifying and then minifying ... quite tedious... have you got a suggestion to streamlining/automatise these processes?
sorry if it sound like a dumb question... and I realise this is not the platform.
from vscode-autoprefixer.
I'm having the same issue with the same error. Is it possible to downgrade the extension on my machine?
Sure! To install the previous version, go to your extensions, click the little cog wheel icon on the Autoprefixer extension and choose "Install Another Version". I installed 3.0.0 and it works great on my machine.
This actually worked, Thank you
from vscode-autoprefixer.
[Autoprefixer]
Error: Failed to load autoprefixer library. Please install autoprefixer in your workspace folder using npm install autoprefixer or globally using npm install -g autoprefixer and then run command again.
at /Users/andyzu/.vscode/extensions/mrmlnc.vscode-autoprefixer-3.0.1/out/extension.js:2:1575513
"autoprefixer.options": {
"browsers": [
"last 3 versions",
"> 5%",
"ie >= 8",
"firefox >= 20",
"chrome >= 35",
"Opera >= 11.5",
"safari >= 8",
"edge >= 90",
"and_uc >= 12",
"and_qq >= 10",
"iOS >= 6",
"android >= 4.4",
]
},
1、npm i -D autoprefixer
2、npm i -g autoprefixer
3、npm i -g postcss
4、npm i -g postcss-loader
5、npm i -g node-sass postcss-cli clean-css-cli browserslist
The error is still there, how can I fix it? THANKS!
I also chose to downgrade to 3.0.0, prompting me:
[object Object] is not a PostCSS plugin。
from vscode-autoprefixer.
Related Issues (20)
- performance exaustion
- ignore prefix on sass files but work on css compiled files HOT 2
- Enable support for .browserslistrc HOT 2
- Extension causes high cpu load HOT 1
- Support for inline `style` blocks?
- Autoprefixer attempting to run on all files HOT 5
- Failed to load autoprefixer library HOT 3
- Stop autoprefixing grid HOT 2
- Run with YARN globally installed autoprefixer
- Not Working HOT 7
- LitElement support
- window 10 autoprefixer It doesn't work
- Infinite CSS prefixing when using a formatter HOT 1
- Not working in VS Code HOT 1
- How to set auto prefixer to work only when saving the document?
- on visual studio the prefix is stripped out
- border-radius not render HOT 1
- Extension doesn't work as expected and also removes random lines from the code
- The prefix order should be changed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-autoprefixer.