romenigld
When I run the Phoenix server It complains this warnings:
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
Why you should do it regularly: https://github.com/browserslist/update-db#readme
So I go to the assets folder and run these command:
npx update-browserslist-db@latest
Need to install the following packages:
update-browserslist-db@1.0.11
Ok to proceed? (y) y
update-browserslist-db: Cannot find package.json. Is this the right directory to run `npx update-browserslist-db` in?
npm notice
npm notice New minor version of npm available! 9.5.0 -> 9.6.5
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.6.5
npm notice Run npm install -g npm@9.6.5 to update!
npm notice
❯ asdf current
elixir 1.14.3-otp-25 /Users/romenigld/.tool-versions
erlang 25.2.3 /Users/romenigld/.tool-versions
nodejs 19.7.0 /Users/romenigld/.tool-versions
postgres 14.3 /Users/romenigld/.tool-versions
ruby 3.0.0 /Users/romenigld/.tool-versions
yarn 1.22.10 /Users/romenigld/.tool-versions
❯ npm -v
9.5.0
❯ npm install -g npm@9.6.5
removed 1 package, and changed 47 packages in 4s
18 packages are looking for funding
run `npm fund` for details
Reshimming asdf nodejs...
❯ npm fund
assets
so I tried again to run the phoenix server and the same message was complaining:
Browserslist: caniuse-lite is outdated. Please run:
npx update-browserslist-db@latest
...
So after this, I run the following commands:
❯ mix clean
❯ mix compile
And tried to run the server again and the same message warning is complaining.
So it go again to the assets folder and installed the npm it compains to this:
❯ cd assets
❯ npm install
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/romenigld/workspace/phoenix/phoenix_live_view/pragprog/phoenix-liveview-2nd-course/rld_code/rld_live_view_studio/assets/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/romenigld/workspace/phoenix/phoenix_live_view/pragprog/phoenix-liveview-2nd-course/rld_code/rld_live_view_studio/assets/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/romenigld/.npm/_logs/2023-04-28T14_28_33_871Z-debug-0.log
Could anyone help me with this?
What I need to do now for fix this?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
Other Trending Topics
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #hex
- #security










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
romenigld
and this is the content of the log file
/Users/romenigld/.npm/_logs/2023-04-28T14_28_33_871Z-debug-0.log:LostKobrakai
That warnings’s suggested resolution is misleading. With the tailwind CLI everything is bundled in the binary, so there’s no way to update browserlist. The only way to get rid of the warning is to update to a newer tailwind version, which being newer has been built less time in the past.
romenigld
could you help me with this?
And I notice when I tried to install the new npm version with the
npm install -g npm@9.6.5.It isn’t changed to the 9.6.5 version.
Which command I can change for this new version?
thank you for reply @LostKobrakai!
LostKobrakai
Phoenix (by default) doesn’t use node or npm directly anymore. It pulls in the tailwind cli with the tailwind hex package. The version of tailwind cli being pulled is defined in your
config/config.exs.romenigld
I run now the and have:
So I discard doing those things like update the nodejs(by asdf) and npm?
My application is running.
LostKobrakai
It doesn’t matter what you do to your local node/npm install. Nothing of that is used.
The only thing you can do is change the version of the tailwind cli being pulled in by phoenix (as mentioned the version is set in your mix config).
romenigld
Thank you very much for clarifying and sorry for dwelling on the wrong idea.
I’m Brazilian and sometimes I don’t understand the English language perfectly.
linusdm
For what it’s worth, I’ve initiated a PR to get rid of that pesky browserslist warning that throws people off guard sometimes. See it evolve (or crash and burn) here: Ignore Browserslist warning. by linusdm · Pull Request #84 · phoenixframework/tailwind · GitHub
You can actually already set a config value for your tailwind config to supress that warning:
Or you can upgrade as was suggested
LostKobrakai
That‘s a great solution, because any version in the generators will eventually become old enough for the warning to show up.
arcanemachine
From what I understand, the procedure to upgrade the Tailwind Hex package (the one that is installed by default in Phoenix >=1.7.0) is as follows:
config/config.exs, upgrade Tailwind to the desired version (list of versions is on their GitHub ‘Releases’ page).mix tailwind.installThat being said, I’m not sure if upgrading will produce any unexpected side effects. I upgraded from
3.2.4to3.3.2and all my tests are still passing FWIW.I posted this here since I couldn’t find the specific noob-level instructions on the subject.