How to run an update on Autoprefixer's caniuse list

305 Views Asked by At

I am running Autoprefixer in Sublime Text 3, and am now getting this error when saving CSS files:

Autoprefixer Error: Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db

The problem I have is simple. I don't know where or how to run the given instruction. Is this done within ST3, or via Terminal on the Mac? And how is it done?

Would really appreciate a pointer.

Thanks.

1

There are 1 best solutions below

5
On BEST ANSWER

This is done from Terminal. All the action takes place in ~/Library/Application Support/Sublime Text 3/Packages/Autoprefixer, so go there first:

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Autoprefixer

Next, we need to delete the old binaries, as at least my version of npm didn't want to overwrite them. This deletes autoprefixer and browserslist:

rm node_modules/.bin/*

Next, all you need to do is run

npm update

(again, from ~/Library/Application Support/Sublime Text 3/Packages/Autoprefixer - this is very important) and you should be all set. When I ran it 10 minutes ago, the results were:

+ [email protected]
+ [email protected]
+ [email protected]
added 3 packages from 3 contributors, removed 8 packages, updated 9 packages and audited 24 packages in 1.07s

3 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Your results may be different depending on when you run the command, as different versions might be available then.