npm - 为什么 npm 包会将 node_modules 文件夹安装到自身中?
问题描述
为什么 npm 包会将 node_modules 文件夹安装到自身中? npm 文件夹
包.json
{
"name": "",
"description": "package",
"main": "src/public-api.ts",
"files": [
"src/"
],
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"format": "prettier --write \"src/**/*.ts\"",
"lint": "tslint -p tsconfig.json"
},
"repository": {
"type": "git",
"url": ""
},
"author": "",
"license": "MIT",
"bugs": {
"url": ""
},
"homepage": "",
"preversion": "npm run lint",
"prepublishOnly": "npm run lint",
"version": "1.0.0",
"postversion": "git push && git push --tags",
"prepare": "npm run build",
"dependencies": {
"@angular/common": "^7.1.0",
"@angular/core": "^7.1.0",
"@angular/forms": "^7.1.0",
"@angular/router": "^7.1.0",
"rxjs": "^6.3.3",
"moment": "^2.24.0"
}
}
如果您在包本身中删除 node_modules,那么一切正常。
解决方案
推荐阅读
- c - alloca 代替 alsa 中的局部变量
- azure - Azure Function App V2 是否可以使用超过 1.5 Gb 的内存
- python - 在 python XA = B 中求解线性方程
- ansible - 在转义发送到 shell 命令的字符串时遇到问题
- java - 双链表java反向函数报错
- c++ - C++ 关于指针和使用函数将它们初始化到堆中的行为到底是什么?
- html - 在 RShiny 中访问 HTML 单选按钮值
- amazon-web-services - Linux (Ubuntu) 上的 CPU 使用率下降
- android - 带有阴影的半透明覆盖在 android 上添加了内部“阴影”
- python - Panda 添加到新数据集时将数据转换为 NaN