npm - npm install 似乎安装太多
问题描述
新手问题
我正在尝试减小应用程序的大小以便在 GitHub 上共享。
当我删除 node_modules 文件夹并运行 npm install 时,我得到一个新的 node_modules 文件夹,其中包含 626 个大小为 226Mb 的子文件夹。
我原以为 npm install 只安装了 package.json 中指定的那些依赖项。
我试过运行 npm prune bot 它什么也没做。
这是 package.json 以防万一。
{
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.myApp",
"tns-android": {
"version": "5.1.0"
}
},
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"@angular/animations": "^7.2.3",
"@angular/common": "^7.2.3",
"@angular/compiler": "^7.2.3",
"@angular/core": "^7.2.3",
"@angular/forms": "^7.2.3",
"@angular/http": "^7.2.3",
"@angular/platform-browser": "^7.2.3",
"@angular/platform-browser-dynamic": "^7.2.3",
"@angular/router": "^7.2.3",
"nativescript-angular": "~7.2.0",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^4.0.1",
"nativescript-imagepicker": "^6.0.4",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^2.0.0",
"nativescript-ui-listview": "^5.1.1",
"reflect-metadata": "~0.1.10",
"rxjs": "~6.4.0",
"tns-core-modules": "^5.1.2",
"zone.js": "^0.8.4"
},
"devDependencies": {
"@angular-devkit/core": "~7.3.0",
"@angular/compiler-cli": "^7.2.3",
"@ngtools/webpack": "~7.3.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"clean-webpack-plugin": "~1.0.1",
"codelyzer": "~4.5.0",
"copy-webpack-plugin": "~4.6.0",
"css-loader": "~2.1.0",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"nativescript-dev-sass": "~1.6.0",
"nativescript-dev-typescript": "^0.7.3",
"nativescript-dev-webpack": "~0.19.1",
"nativescript-worker-loader": "~0.9.0",
"raw-loader": "~1.0.0",
"resolve-url-loader": "~3.0.0",
"sass-loader": "~7.1.0",
"tslint": "~5.12.1",
"typescript": "~3.3.1",
"uglifyjs-webpack-plugin": "~2.1.1",
"webpack": "~4.29.1",
"webpack-bundle-analyzer": "~3.0.3",
"webpack-cli": "~3.2.3",
"webpack-sources": "~1.3.0"
}
}
谢谢
解决方案
推荐阅读
- ruby-on-rails - 嵌套资源的路径
- java - 为什么需要在 Spring Boot 中同时自动装配和初始化方法
- c - 将静态函数分离到 C 中的另一个(头文件?)文件中
- javascript - 使用 Javascript 从数据值构建数组
- python - 将 .py 转换为 exe。使用 pyinstaller。错误
- selenium-webdriver - 即使元素显示在 Selenium 中,每次都会执行 catch 语句
- django - 使用 Django 的动态引导选项卡
- google-chrome - 在谷歌浏览器中重定向到 [URL]/robots.txt
- html - 响应式背景图像 div 和固定导航的重叠内容问题
- python - 通过 Robotframework SSH 执行命令时的权限问题