当我运行我的NextJs程序时,这个错误总是会弹出
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db然后我在shell中运行npx浏览器shell@update-update-db:
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当我再次运行我的下一个程序时,也会发生同样的错误。这件事昨天开始发生在我身上。我只是使用npx创建下一个应用程序和npm运行开发。
发布于 2021-01-27 18:26:59
更新
新版本(10.0.6)刚刚发布。没有警告。
这是当前Next.js版本(10.0.5)中的一个错误警告。
它已经在金丝雀版本中解决了,这是下一个稳定版本的基础。您可以安装它(npm install next@canary或yarn add next@canary),并确保没有警告。
由于不推荐在生产中使用金丝雀版本,所以您可以在10.0.5中继续工作,不会产生任何副作用。警告将在新的稳定版本发布后消失。
https://stackoverflow.com/questions/65878687
复制相似问题