我有 2 个 Next.js 应用程序运行时出现相同的消息错误:Browserslist: caniuse-lite is outdated. Please run next command 'yarn upgrade'
。当我运行诸如yarn dev
oryarn start
或之类的命令时会显示该消息yarn build
。NPM 也是如此。
- 我已经多次尝试命令(
yarn upgrade
)但没有成功; - 我已经尝试删除锁定文件以及 node_modules 但消息仍然存在;
- 我已经尝试过使用 Visual Studio 和终端(Ubuntu);
几天前还好,所以我不确定它是否与一些新的软件包更新有关。
其他人有同样的吗?
编辑:
我package.json
的是:
{
"name": "website-2020",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "node server.js",
"build": "next build",
"start": "NODE_ENV=production node server.js",
},
"dependencies": {
"@tanem/react-nprogress": "^3.0.24",
"@zeit/next-sass": "^1.0.1",
"express": "^4.17.1",
"isomorphic-unfetch": "^3.0.0",
"next": "^9.3.5",
"node-sass": "^4.14.0",
"prop-types": "^15.7.2",
"react": "^16.13.1",
"react-bootstrap": "^1.0.1",
"react-data-table-component": "^6.8.0",
"react-dom": "^16.13.1",
"react-icons": "^3.10.0",
"reactstrap": "^8.4.1",
"styled-components": "^5.1.0"
},
"devDependencies": {
"faker": "^4.1.0"
}
}