Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
2.1k views
in Technique[技术] by (71.8m points)

next.js - Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db NextJS

When I run my NextJs program this error always pops up

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

So then I run npx browserslist@latest --update-db in the shell:

npx: installed 6 in 1.905s
Current version: 1.0.30001179
New version:     1.0.30001179
Removing old caniuse-lite from lock file
Installing new caniuse-lite version
$ npm install caniuse-lite
Cleaning package.json dependencies from caniuse-lite
$ npm uninstall caniuse-lite
caniuse-lite has been successfully updated

No target browser changes

And the I when I run my Next program again, the same error occurs. This started happening to me yesterday. I just used npx create-next-app and the npm run dev.

question from:https://stackoverflow.com/questions/65878687/browserslist-caniuse-lite-is-outdated-please-run-npx-browserslistlatest-up

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

UPDATE

The new version (10.0.6) has been released few moments ago. No warnings present.


This is a falsy warning in current Next.js version (10.0.5).

It's already solved in canary version, which is a base for the next stable version. You can install it (npm install next@canary or yarn add next@canary) and make sure there are no warnings.

Since canary version is not recommended for using in production, you can continue working in 10.0.5 without any side effects. The warning will disappear after new stable version release.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...