Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browserlist caniuse-lite outdated message when building #6305

Closed
smenzer opened this issue Feb 12, 2021 · 7 comments
Closed

browserlist caniuse-lite outdated message when building #6305

smenzer opened this issue Feb 12, 2021 · 7 comments
Assignees

Comments

@smenzer
Copy link
Collaborator

smenzer commented Feb 12, 2021

Description

When you build pbjs, there's a message at the top that says the Browserslist: caniuse-lite is outdated and suggests running npx browserslist@latest --update-db to fix this. I'm not sure what exactly this is used for and if we should update (or should should be responsible)...but I've seen this message for a while now so thought we should document and deal with it.

I'm not sure if this is an issue with my local environment or with packages used by prebid.

Steps to reproduce

$ gulp build
[08:56:04] Using gulpfile ~/src/Prebid.js/gulpfile.js
[08:56:04] Starting 'build'...
[08:56:04] Starting 'clean'...
[08:56:04] Finished 'clean' after 157 ms
[08:56:04] Starting 'build-bundle-prod'...
[08:56:04] Starting 'makeWebpackPkg'...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db
@ChrisHuie
Copy link
Collaborator

ChrisHuie commented Feb 18, 2021

@smenzer
Pretty sure Browserlist is just a config to define target browsers and versions. I think it is integrated directly into Babel but I could be wrong on that.

I checked out the Babel/preset-env in the package-lock file and looks like this package is set to "browserslist": "^4.12.0" which should still be grabbing you the latest version of the package since there hasn't been a breaking version change as it seems to now be on 4.16.

I haven't come across this warning in my console yet though.

@bretg
Copy link
Collaborator

bretg commented Feb 25, 2021

@smenzer - Chris and I chatted. We think you should try a fresh npm install and then try the build. Not happening for us.

@smenzer
Copy link
Collaborator Author

smenzer commented Feb 25, 2021

hi @bretg and @ChrisHuie - thanks for taking a look. i did a fresh install but still getting it. sounds like it's local to my machine, though, so i'll look into it more on my end, I just brought this up to make sure it wasn't something impacting others. thanks!

@smenzer smenzer closed this as completed Feb 25, 2021
@patmmccann
Copy link
Collaborator

appears to refer to db of which browsers are in the target

"> 0.25%",

not sure how out of date it is

@patmmccann
Copy link
Collaborator

@patmmccann
Copy link
Collaborator

patmmccann commented Jun 3, 2024

updating package-lock to https://www.npmjs.com/package/@babel/helper-compilation-targets/v/7.24.6 should fix? Or rather babel to 7.24.6

@mkomorski
Copy link
Collaborator

mkomorski commented Jun 5, 2024

The message is gone when I bump @babel/core to 7.24.6 but another problem shows up (same situation when I directly update version of browserslist so I believe it's a root cause). I can see runtime errors in each place where vars are initialized in this way:

const bid = {
      'bidder': 'adg',
      'params': {
        id: '58278', // banner
      }
};

it('should return false when required params are not passed', function () {
      let bid = Object.assign({}, bid);
      delete bid.params;
      bid.params = {};
      expect(spec.isBidRequestValid(bid)).to.equal(false);
});

ReferenceError: Cannot access 'bid' before initialization

or (which I don't actually understand tbh since it's the first declaration of BID_ADAGIO):

const BID_ADAGIO = Object.assign({}, BID_ADAGIO, { ... })

Lots of tests fail because of this, so increasing mentioned libs versions would require to refactor all of these occurences in order to get rid of caniuse-lite message

@patmmccann

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

5 participants