每次运行npm安装时,@angular文件夹中的角度库将被自动删除,除了2个文件夹(platform-browser& platform-browser-dynamic)。下次我将从不同的文件夹中复制它,如果我运行它将再次被删除。我在下面贴了我的package.json,是否有任何设置导致这个,
{
"name": "expressdemo",
"version": "1.0.0",
"description": "",
"main": "index.html",
"scripts": {
"serve": "lite-server -c=bs-config.json",
"start": "concurrently \"npm run build:watch\" \"npm run serve\"",
"test": "echo \"Error: no test specified\" && exit 1",
"serve:e2e": "lite-server -c=bs-config.e2e.json",
"e2e": "concurrently \"npm run serve:e2e\" \"npm run protractor\" --kill-others --success first",
"preprotractor": "webdriver-manager update",
"protractor": "protractor protractor.config.js",
"pretest": "npm run build",
"pretest:once": "npm run build",
"test:once": "karma start karma.conf.js --single-run"
},
"author": "Parameswari",
"license": "ISC",
"dependencies": {
"@angular/platform-browser": "~4.3.4",
"@angular/platform-browser-dynamic": "~4.3.4",
"angular2-csv": "^0.2.5",
"body-parser": "^1.18.1",
"concurrently": "^3.2.0",
"core-js": "^2.4.1",
"cors": "^2.8.4",
"express": "^4.15.4",
"lite-server": "^2.2.2",
"oracledb": "^1.13.1",
"rxjs": "5.0.1",
"systemjs": "0.19.40",
"zone.js": "^0.8.4"
},
"devDependencies": {
"concurrently": "^3.2.0",
"lite-server": "^2.2.2",
"typescript": "~2.3.2",
"canonical-path": "0.0.2",
"tslint": "^3.15.1",
"lodash": "^4.16.4",
"jasmine-core": "~2.4.1",
"karma": "^1.3.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-jasmine": "^1.0.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~4.0.14",
"rimraf": "^2.5.4",
"@types/node": "^6.0.46",
"@types/jasmine": "2.5.36"
}
}
答案 0 :(得分:0)
因为你没有在package.json
中包含角度依赖项所以在package.jaon中将所有角度依赖项添加到依赖项部分中,就像其他两个库所包含的那样
dependencies {
@angular/core: 4.2.5
}