[Pkg-javascript-devel] Bug#991656: node-superagent: FTBFS: Browserslist: caniuse-lite is outdated. Please run: npx browserslist at latest --update-db

Pirate Praveen praveen at onenetbeyond.org
Thu Jul 29 19:50:39 BST 2021


Control: retitle -1  Unknown browser query `> 1%`. Maybe you are using 
old Browserslist or made typo in query.

On Thu, 29 Jul 2021 17:14:42 +0200 Lucas Nussbaum <lucas at debian.org> 
wrote:
 > Source: node-superagent
 > Version: 6.1.0-3
 > Severity: serious
 > Justification: FTBFS on amd64
 > Tags: bullseye sid ftbfs
 > Usertags: ftbfs-20210728 ftbfs-bullseye
 >
 > Hi,
 >
 > During a rebuild of all packages in bullseye, your package failed to 
build
 > on amd64.
 >
 > Relevant part (hopefully):
 > > make[1]: Entering directory '/<<PKGBUILDDIR>>'
 > > babeljs --config-file ./.lib.babelrc src --out-dir lib
 > > Browserslist: caniuse-lite is outdated. Please run:
 > > npx browserslist at latest --update-db
 > >
 > > Why you should do it regularly:
 > > https://github.com/browserslist/browserslist#browsers-data-updating
 > > Error [BrowserslistError]: [BABEL] 
/<<PKGBUILDDIR>>/src/agent-base.js: Unknown browser query `> 1%`. Maybe 
you are using old Browserslist or made typo in query. (While 
processing: "/usr/share/nodejs/@babel/preset-env/lib/index.js")

The actual error that caused failure is,
Unknown browser query `> 1%`. Maybe you are using old Browserslist or 
made typo in query.

This patch fixes the build failure, .browserslistrc already has these 
values and babel-preset-env recommends using this option as per 
https://babeljs.io/docs/en/babel-preset-env#browserslist-integration

--- a/.lib.babelrc
+++ b/.lib.babelrc
@@ -2,8 +2,7 @@
   "presets": [
     ["@babel/env", {
       "targets": {
- "node": "6.4.0",
- "browsers": [ "> 1%", "last 2 versions", "ie 9" ]
+ "node": "6.4.0"
       }
     }]
   ],

But later down in the same doc it says,

By default @babel/preset-env will use browserslist config sources 
unless either the targets or ignoreBrowserslistConfig options are set.

and we have targets option set here. One option would be to drop 
targets entirely as we need to support only the nodejs version shipped 
with debian.



More information about the Pkg-javascript-devel mailing list