yinxin630 / fiora

An interesting open source chat application. Developed with node.js, mongoDB, socket.io and react
https://fiora.suisuijiang.com
MIT License
6.57k stars 1.31k forks source link

yarn build:web提示Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db #520

Closed hatsuyuki2333 closed 1 year ago

hatsuyuki2333 commented 1 year ago

昨天把redis和mongodb整好了,yarn start正常了,但是打开浏览器提示要进行yarn build:web(我已经弄过了 于是又build一遍,它提示Browserslist: caniuse-lite is outdated. Please run: npx browserslist@latest --update-db(第一次build好像也是这样,但是我没注意。) 运行npx之后提示已更新,但是build仍然提示这个。

>yarn build:web
yarn run v1.22.19
$ npx lerna run build:web --stream
lerna notice cli v4.0.0
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run build:web"
@fiora/web: warning package.json: "dependencies" has dependency "@testing-library/jest-dom" with range "^5.14.1" that collides with a dependency in "devDependencies" of the same name with version "^4.2.4"
@fiora/web: $ rm -rf dist && cross-env NODE_ENV=production DOTENV_CONFIG_PATH=../../.env webpack --config build/webpack.prod.js && cp -r -f dist/fiora/* ../server/public
@fiora/web: ℹ Compiling Webpack
@fiora/web: Browserslist: caniuse-lite is outdated. Please run:
@fiora/web: npx browserslist@latest --update-db
@fiora/web: Why you should do it regularly:
@fiora/web: https://github.com/browserslist/browserslist#browsers-data-updating

到这里卡住,需要按Ctrl+C退出 npx:

 npx browserlist@latest --update-db
npx: installed 8 in 5.904s

    ╭─────────────────────────────────╮
    │                                 │
    │  You made typo in browserslist  │
    │                                 │
    ╰─────────────────────────────────╯

但是仍然无法build

hatsuyuki2333 commented 1 year ago

打错了

 npx browserslist@latest --update-db
npx: installed 7 in 8.901s
Latest version:     1.0.30001430
Installed version:  1.0.30001430
caniuse-lite is up to date
caniuse-lite has been successfully updated
hatsuyuki2333 commented 1 year ago

已解决 build同时在另一个终端运行npx就好了

hatsuyuki2333 commented 1 year ago

又不行了……怎么搞啊

amakerlife commented 1 year ago

又不行了……怎么搞啊

@hatsuyuki2333 您是怎么解决的