rails / tailwindcss-rails

Other
1.39k stars 170 forks source link

Browserslist: caniuse-lite is outdated. #287

Closed mountaindog closed 10 months ago

mountaindog commented 10 months ago

This new vanilla Rails 7.1.1 install uses --css=tailwind and importmaps (rails new . --css tailwind). Starting the rails server with bin/dev generates a css Browerslist warning.

Specs: Using asdf with ruby 3.2.2, nodejs: 21.0.0 (latest), npm: 10.2.0

08:47:48 web.1  | => Booting Puma
08:47:48 web.1  | => Rails 7.1.1 application starting in development 
...
08:41:04 css.1  | Browserslist: caniuse-lite is outdated. Please run:
08:41:04 css.1  |   npx update-browserslist-db@latest
08:41:04 css.1  |   Why you should do it regularly: https://github.com/browserslist/update-db#readme
08:41:04 css.1  | 
08:41:04 css.1  | Rebuilding...
08:41:04 css.1  | 
08:41:04 css.1  | Done in 172ms.

Running the update npx command, as suggested, generates an error.

update-browserslist-db: Cannot find package.json. Is this the right directory to run npx update-browserslist-db in?

Could this be safely ignored or need attention? I have not seen this before. Granted, I have mainly used esbuild and not importmaps - perhaps it's looking for node_modules dir. I am just throwing this out there. Any guidance would be appreciated.

flavorjones commented 10 months ago

Duplicate of #283