Rich_Morin

Rich_Morin

I’m getting the following warning when I run mix phx.server:

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

I tried running the command, and got no errors, but the warning didn’t go away. I also tried mix clean; mix compile, to no avail. Suggestions?

Showing Posts 1 to 5

Nicd

Nicd

Did you run the command in the assets directory, where the npm assets live?

gabokarma

gabokarma

That warning is shown because of the defined version of “caniuse-lite” in assets/package-lock.json file.

I sended a pull-request for update the version. :slight_smile:

romenigld

romenigld

I have this complaining when I run the phoenix server.

iex(1)> Browserslist: caniuse-lite is outdated. Please run:
  npx browserslist@latest --update-db
  Why you should do it regularly: https://github.com/browserslist/browserslist#browsers-data-updating

so I go to the assets folder and run:
npx browserslist@latest --update-db

then it complains for this:

Need to install the following packages:
  browserslist@latest
Ok to proceed? (y) y

/Users/romenigld/.npm/_npx/072487b38308305a/node_modules/update-browserslist-db/index.js:54
  throw new BrowserslistUpdateError(
  ^
Error [BrowserslistUpdateError]: No lockfile found. Run "npm install", "yarn install" or "pnpm install"
    at detectLockfile (/Users/romenigld/.npm/_npx/072487b38308305a/node_modules/update-browserslist-db/index.js:54:9)
    at updateDB (/Users/romenigld/.npm/_npx/072487b38308305a/node_modules/update-browserslist-db/index.js:258:14)
    at Object.<anonymous> (/Users/romenigld/.npm/_npx/072487b38308305a/node_modules/browserslist/cli.js:42:3)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Module._load (node:internal/modules/cjs/loader:827:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  browserslist: true
}

Node.js v18.2.0
npm notice
npm notice New minor version of npm available! 8.9.0 -> 8.19.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.2
npm notice Run npm install -g npm@8.19.2 to update!
npm notice

I want to know if it’s ok to update the npm with the phoenix v1.6.10?

derek-zhou

derek-zhou

I’d just leave the caniuse-lite warning alone. Doesn’t hurt anything. I am not brave enough to dig in the rabbit hole of npm.

frerich

frerich

Upgrading the Tailwind CLI version helps with this – it’s Tailwind CSS which ships with these node modules, and they tend to get outdated over time.

  1. Adjust the Tailwind config by editing config/config.exs
  2. Run mix tailwind.install to pick up the new configuration, upgrading Tailwind CLI
— All posts loaded —

Where Next? Top

Trending in Questions Top

katta
I having some trouble figuring out if I have set myself too strict of standards for my production server. Currently I can handle 75% of r...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
achenet
Hello, I’m trying to build a basic Phoenix web-app, and I’d like to use Tailwind. However, when I launch mix phx.server, I get an error...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Cxx-mlr
I’m working on a small exercise involving update_in/3, and I came up with this solution: data = %{ name: "Periodic Table", category:...
New
ChrisAmelia
I’ve got trouble wrapping my head around the order in which functions are called in this snippet (from Phoenix’s authentication): toke...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews