[Solved] BrowserslistError: Unknown browser kaios

(971 Views)


In this article, we will discuss an often encountered problem with React. When updating latest versions of node (v10.15.3), npm(6.9.0) and yarn(v1.15.2) we might have seen the issue given below:

./src/assets/css/material-dashboard-react.css?v=1.2.0 (./node_modules/css-loader??ref--6-oneOf-3-1!./node_modules/postcss-loader/src??postcss!./src/assets/css/material-dashboard-react.css?v=1.2.0) BrowserslistError: Unknown browser kaios at Array.reduce (<anonymous>) at Array.some (<anonymous>) at Array.filter (<anonymous>) at new Promise (<anonymous>)

The cause of the problem is that browserslist has dependencies which is not getting resolved by yarn. yarn upgrade does not touch the deep level dependencies and yarn is not expected to do that.

Solution:

The solution to this problem is to fix the version of caniuse-lite in the package.json. This will remove the incompatibility. Follow the below mentioned steps to solve this error:

  1. Do the below changes to package.json
  2. "resolutions": { "caniuse-lite": "1.0.30000957" },
  3. Run:
  4. $ yarn
  5. Check the version used by yarn.lock
  6. caniuse-lite@1.0.30000957, caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000939, caniuse-lite@^1.0.30000955, caniuse-lite@^1.0.30000957: version "1.0.30000957" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000957.tgz#fb1026bf184d7d62c685205358c3b24b9e29f7b3" integrity sha512-8wxNrjAzyiHcLXN/iunskqQnJquQQ6VX8JHfW5kLgAPRSiSuKZiNfmIkP5j7jgyXqAQBSoXyJxfnbCFS0ThSiQ==

This should resolve your problem.

Solution Worked 1 UpvotesUpvote

        

Solution Didn't Worked 0 DownvotesDownvote

        


Comments



Search

Earn Money by Submitting Articles
Start submutting articles. Click here to get started
Play 2048 Game Online

Play Duckhunt Online
Search Tags