Unlock seamless workflows and faster delivery with our latest releases - Join the deep dive

Discussion about resolving a BrowserslistError in package.json

6 replies
Last updated: Feb 24, 2022
BrowserslistError: Unknown browser query
dead

I was getting this error, even with all updated packages.
Feb 24, 2022, 6:21 PM
In your
package.json
, do you have a
browserslist
option? If so can you share it?
Feb 24, 2022, 6:24 PM
no, doesn't have.
here you can look at:


{
 
_"name"_: "marbles-studio",
 
_"private"_: true,
 
_"version"_: "1.0.0",
 
_"description"_: "",
 
_"main"_: "package.json",
 
_"author"_: "andyatflocc <<mailto:andy@flocc.co|andy@flocc.co>>",
 
_"license"_: "UNLICENSED",
 
_"scripts"_: {
   
_"start"_: "sanity start",
   
_"build"_: "sanity build"
  },
 
_"keywords"_: [
    "sanity"
  ],
 
_"dependencies"_: {
   
_"@sanity/base"_: "^2.27.1",
   
_"@sanity/cli"_: "^2.27.0",
   
_"@sanity/components"_: "^2.14.0",
   
_"@sanity/core"_: "^2.27.0",
   
_"@sanity/dashboard"_: "^2.27.1",
   
_"@sanity/default-layout"_: "^2.27.1",
   
_"@sanity/default-login"_: "^2.27.0",
   
_"@sanity/desk-tool"_: "^2.27.1",
   
_"@sanity/google-maps-input"_: "^2.27.1",
   
_"@sanity/production-preview"_: "^2.15.0",
   
_"@sanity/vision"_: "^2.27.1",
   
_"@weflocc/kata"_: "^2.0.26",
   
_"@weflocc/kata-studio"_: "^1.3.48",
   
_"get-youtube-id"_: "^1.0.1",
   
_"prop-types"_: "^15.8",
   
_"react"_: "^17.0",
   
_"react-dom"_: "^17.0",
   
_"react-icons"_: "^4.3.1",
   
_"react-youtube"_: "^7.14.0",
   
_"sanity-plugin-dashboard-widget-document-list"_: "^0.0.13",
   
_"sanity-plugin-dashboard-widget-netlify"_: "^1.2.1",
   
_"sanity-plugin-media"_: "^1.4.4",
   
_"sanity-plugin-mux-input"_: "^1.1.0",
   
_"sanity-plugin-order-documents"_: "^0.0.22",
   
_"sanity-plugin-table"_: "^2.3.0",
   
_"styled-components"_: "^5.3.3"
  },
 
_"devDependencies"_: {
   
_"babel-eslint"_: "^10.0.1",
   
_"eslint"_: "^8.9.0",
   
_"eslint-config-standard"_: "^16.0.3",
   
_"eslint-config-standard-react"_: "^11.0.1",
   
_"eslint-plugin-import"_: "^2.25.4",
   
_"eslint-plugin-node"_: "^11.1.0",
   
_"eslint-plugin-promise"_: "^6.0.0",
   
_"eslint-plugin-react"_: "^7.28.0",
   
_"eslint-plugin-standard"_: "^4.1.0",
   
_"prettier"_: "^2.5.1",
   
_"prettier-eslint-cli"_: "^5.0.1"
  }
}
Feb 24, 2022, 6:25 PM
Hmm, some of those packages aren't from Sanity, so I can't be sure that they're not relying on an outdated browserlist. Can you try the solution in this article to see if it helps?
Feb 24, 2022, 6:30 PM
I tried this and no success 😢
Feb 24, 2022, 6:32 PM
I think I'll try to build from scratch
Feb 24, 2022, 6:35 PM
fixed when I inserted the
"browserslist": { "production": [ "&gt;0.2%", "not dead", "not op_mini all" ], "development": [] }

inside my package.json.

I have to make yarn upgrade as well
Feb 24, 2022, 6:59 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?