怎样删除项目当中没用的npm包

发布时间:2021-07-20 09:29:29 作者:chen
来源:亿速云 阅读:202

本篇内容介绍了“怎样删除项目当中没用的npm包”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!

     在公司中,我们大部分都是多人共同开发和长时间维护一个项目,但是有时候我们会发现有很多已经废弃的npm 包存在 package.json 中,我们想要删除,但是又不能盲目的删除?那么  depcheck  它来了。   

如何使用呢   

第一步   

全局安装:

npm install depcheck -g

第二步

项目更目录下执行 depcheck (这里拿我们自己的项目来做的测试),执行之后,根据自己得到的结果人工删除即可

Unused dependencies* @xkeshi/vue-qrcode* any-promise* backpack-core* cookie-universal-nuxt* tls* to* vue-loader* vue-meta-infoUnused devDependencies* @babel/cli* @babel/preset-es2015* @babel/preset-react* @babel/preset-stage-0* @babel/register* @nuxtjs/sentry* axios-mock-adapter* babel-eslint* babel-loader* babel-plugin-component* child_process* css-loader* element-theme* element-theme-chalk* es3-compatible-webpack-plugin* es3ify-loader* eslint-friendly-formatter* eslint-loader* eslint-plugin-html* express* fs* http-proxy-middleware* jsencrypt* lang* net* node-sass* post-loader* qs* sass-loader* vue-style-loader* webpack-cliMissing dependencies* vue-no-ssr: ./.nuxt/components/no-ssr.js* unfetch: ./.nuxt/client.js* consola: ./.nuxt/client.js* nuxt_plugin_route_338f5eda: ./.nuxt/index.js* nuxt_plugin_main_6a83762f: ./.nuxt/index.js* nuxt_plugin_http_6a8178fe: ./.nuxt/index.js* nuxt_plugin_qrcode_7ec40a18: ./.nuxt/index.js* nuxt_plugin_aliyunosssdkmin_02f21098: ./.nuxt/index.js* nuxt_plugin_aliyunuploadsdk131min_c379eff6: ./.nuxt/index.js* vue-router: ./.nuxt/router.js* node-fetch: ./.nuxt/server.js* vuex: ./.nuxt/store.js* ~: ./assets/more-editor/more-editor.js* resize-observer-polyfill: ./component/util/resizeEvent.js* co: ./pages/circle/component/dakaEditor/editor.vue

“怎样删除项目当中没用的npm包”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注亿速云网站,小编将为大家输出更多高质量的实用文章!

推荐阅读:
  1. Npm包的开发
  2. 如何查看电脑上npm包全局安装路径

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

npm包

上一篇:基于Bootstrap table组件如何实现多层表头

下一篇:怎么修改gazebo物理参数

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》