Browserslist: caniuse-lite is outdated. Please run next command `npm update caniuse-lite browserslist`

前端 未结 20 2430
忘掉有多难
忘掉有多难 2020-12-08 03:31

Recently, when I compile my scss files I get an error. The error message says:

Browserslist: caniuse-lite is outdated. Please run next command n

20条回答
  •  渐次进展
    2020-12-08 04:11

    I found a short cut rather than going through vs code appData/webCompiler, I added it as a dependency to my project with this cmd npm i caniuse-lite browserslist. But you might install it globally to avoid adding it to each project.

    After installation, you could remove it from your project package.json and do npm i.

    Update:

    In case, Above solution didn't fix it. You could run npm update, as this would upgrade deprecated/outdated packages.

    Note:

    After you've run the npm update, there may be missing dependencies. Trace the error and install the missing dependencies. Mine was nodemon, which I fix by npm i nodemon -g

提交回复
热议问题