Browserslist: caniuse-lite is outdated. Please run: npx ....

简介: Browserslist: caniuse-lite is outdated. Please run: npx ....
  • 今天打包 Vue 项目,突然蹦出一个告警:
Browserslist: caniuse-lite is outdated. Please run:
$ npx browserslist@latest --update-db
或者
$ npm update
  • 按照提示操作,运行上面 npx browserslist@latest --update-db 能解决问题。
  • 但是有的版本会报错提示运行 npm update,但是运行 npm update 不能解决问题。
  • 于是查询了一下 npm 手册,得知是不能直接运行 npm update 的,必须带上包名,所以应该这样写命令:
$ npm update caniuse-lite
  • 或者直接删了 node_modules/caniuse-lite 文件夹,然后重新安装:
$ npm i -g caniuse-lite

  • 如果还不行,试试这个步骤。
    1、先删了 node_modules/caniuse-litenode_modules/browserslist 两个文件夹。
    2、然后运行下面的命令:
$ npm i --save-dev caniuse-lite browserslist
相关文章
|
9月前
|
JavaScript Unix Linux
⨯ cannot execute cause=fork/exec...pnpm\bin\pnpm.cjs: %1 is not a valid Win32 application.
⨯ cannot execute cause=fork/exec...pnpm\bin\pnpm.cjs: %1 is not a valid Win32 application.
714 0
|
9月前
项目打包报错“caniuse-lite is outdated. Please run next command `npm update`”的解决方案
项目打包报错“caniuse-lite is outdated. Please run next command `npm update`”的解决方案
509 1
|
JavaScript 前端开发 jenkins
【前端】vue项目打包Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest解决方案
【前端】vue项目打包Browserslist: caniuse-lite is outdated. Please run: npx update-browserslist-db@latest解决方案
1607 0
|
5月前
执行npm run dev的时候发生了什么
执行npm run dev的时候发生了什么
421 60
|
9月前
|
Python
Python Playwright 打包报错 Please run the following command to download new browsers
Python Playwright 打包报错 Please run the following command to download new browsers
301 0
|
JavaScript
【Vue】npm run serve 和 npm run dev 有什么区别
【Vue】npm run serve 和 npm run dev 有什么区别
|
开发框架 JavaScript 前端开发
npm run build 后如何直接运行项目
npm run build 后如何直接运行项目
小匕首-dotnet cli使用tool指令
小匕首-dotnet cli使用tool指令
191 0
|
前端开发
npm run demo1 && npm run demo2 & npm run demo3 这个命令到底会怎么执行呢
总结: 按照顺序一个命令执行完毕,才会继续执行后面的命令
122 0
如何解决安装hexo init blog 时,出现WARN Failed to install dependencies. Please run ‘npm install‘ in “E:\tests
如何解决安装hexo init blog 时,出现WARN Failed to install dependencies. Please run ‘npm install‘ in “E:\tests
如何解决安装hexo init blog 时,出现WARN Failed to install dependencies. Please run ‘npm install‘ in “E:\tests

热门文章

最新文章