Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

Is the caniuse-lite dependency an outdated dependency?


Asked by Clarissa Whitney on Dec 02, 2021 FAQ



报错:caniuse-lite is outdated PanJiaChen/vue-element-admin#1961 @Dan503 thank you ,I got resolved this problem! In my case I am using the postcss-loader which requires postcss, that requires autoprefixer which requires caniuse-lite as a dependency. npm will use whatever the oldest common dependency is of packages.
Moreover,
If nothing in your project changed and you suddenly see this msg when starting or building your project, it probably means there was a recent version update to caniuse-lite. Unfortunately, the text msg that browserslist displays is only helpful if you installed caniuse-lite as a dependency of your project. Most likely, you did not.
Consequently, When your project was created (maybe with app angularapp or create-react-app or similar for your framework), npm installed browserslist as a dependency of its needed tools, not as one of your project's dependencies. At the same time, caniuse-lite was installed as a dependency of browserslist.
Next,
Delete following folders from node_modulesfolder: caniuse-liteand browserslistOpen up CMD (inside C:\Users\USERNAME\AppData\Local\Temp\WebCompilerX.X.X) and run: npm i caniuse-lite browserslist Share Improve this answer Follow edited Jan 11 '20 at 9:31
Thereof,
At the same time, caniuse-lite was installed as a dependency of browserslist. Later when the project was updated, a package-lock.json file was created which locks all dependencies to a specific version.