我正在尝试将项目中的angular从2.0.1更新为2.4.5。我在package.json中更改了版本:
{
"name": "xxx",
"description": "Frontend project",
"version": "1.0.0",
"private": true,
"main": "index.html",
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"start": "concurrent \"npm run tsc:w\" \"npm run lite\" ",
"test": "gulp test",
"webdriver-update": "webdriver-manager update",
"webdriver-start": "webdriver-manager start",
"e2e": "protractor",
"e2e-live": "protractor --elementExplorer"
},
"dependencies": {
"@angular/common": "^2.4.5",
"@angular/compiler": "^2.4.5",
"@angular/core": "^2.4.5",
"@angular/forms": "^2.4.5",
"@angular/http": "^2.4.5",
"@angular/platform-browser": "^2.4.5",
"@angular/platform-browser-dynamic": "^2.4.5",
"@angular/platform-server": "^2.4.5",
"@angular/router": "3.0.1",
"@angular/upgrade": "^2.4.5",
"angular2-google-maps": "0.15.0",
"bower": "^1.8.4",
"es6-promise": "3.0.2",
"es6-shim": "0.35.1",
"gulp-jasmine": "2.2.1",
"jasmine-core": "2.4.1",
"jasmine-reporters": "2.1.1",
"jasmine-spec-reporter": "2.4.0",
"jszip": "2.6.0",
"ng2-translate": "3.0.0",
"reflect-metadata": "0.1.8",
"rxjs": "^5.0.1",
"semver": "^5.5.1",
"symbol-observable": "0.2.4",
"systemjs": "0.19.39",
"traceur": "0.0.96",
"zone.js": "^0.7.2"
},
"devDependencies": {
"@angular/cli": "^6.1.5",
"browser-sync": "2.11.1",
"concurrently": "3.0.0",
"del": "2.2.0",
"gulp": "3.8.11",
"gulp-concat": "2.6.0",
"gulp-debug": "2.0.1",
"gulp-inject": "1.2.0",
"gulp-inline-ng2-template": "4.0.0",
"gulp-newer": "1.1.0",
"gulp-plumber": "1.0.1",
"gulp-protractor": "2.1.0",
"gulp-rename": "1.2.2",
"gulp-replace": "0.5.4",
"gulp-rimraf": "0.1.1",
"gulp-sass": "2.0.4",
"gulp-sourcemaps": "1.5.1",
"gulp-traceur": "0.17.2",
"gulp-tslint": "1.5.0",
"gulp-typescript": "^2.13.6",
"gulp-uglify": "1.5.1",
"gulp-vulcanize": "6.1.0",
"gulp-war": "0.1.2",
"gulp-webserver": "0.9.1",
"gulp-zip": "3.1.0",
"karma": "1.1.2",
"karma-chrome-launcher": "1.0.1",
"karma-cli": "1.0.1",
"karma-coverage": "1.1.1",
"karma-ie-launcher": "1.0.0",
"karma-jasmine": "1.0.2",
"karma-junit-reporter": "1.1.0",
"karma-mocha": "1.1.1",
"karma-phantomjs-launcher": "1.0.1",
"karma-renamer-preprocessor": "0.0.1",
"live-server": "0.9.0",
"mocha": "2.3.4",
"phantomjs-prebuilt": "2.1.7",
"protractor": "3.0.0",
"systemjs-builder": "0.15.34",
"traceur": "0.0.96",
"typescript": "^2.9.2",
"typings": "1.4.0"
}
}
但是我在运行npm install时遇到了这个问题:
npm WARN回滚回滚node-pre-gyp@0.10.0失败(这是 可能无害):EPERM:不允许操作,lstat 'C:\ Users \ LOU \ Projects \ spas2-backend \ frontends \ cockpit \ node_modules \ fsevents \ node_modules' npm WARN @ angular / router @ 3.0.1需要一个对等体@ angular / core @ 2.0.1 但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / router @ 3.0.1需要一个对等体 @ angular / common @ 2.0.1,但未安装。您必须安装对等 自己依赖。 npm WARN @ angular / router @ 3.0.1需要一个对等体 @ angular / platform-browser @ 2.0.1,但未安装。你必须 自己安装对等依赖项。 npm警告@ angular / router @ 3.0.1 需要rxjs@5.0.0-beta.12的同位体,但未安装。你必须 自己安装对等依赖项。 npm警告 angular2-google-maps@0.15.0需要zone.js@^0.6.21的同位体,但 没有安装。您必须自己安装对等依赖项。 npm WARN ng2-translate@3.0.0需要一个对等体@ angular / core @〜2.0.0,但 没有安装。您必须自己安装对等依赖项。 npm WARN ng2-translate@3.0.0需要一个@ angular / http @〜2.0.0的同位体,但是 没有安装。您必须自己安装对等依赖项。 npm 警告软件包traceur包含在开发和生产中 依赖性。 npm警告可选的跳过选择性依赖: fsevents@1.2.4(node_modules \ fsevents):npm警告notsup跳过 可选依赖关系:fsevents@1.2.4不受支持的平台:需要 {“ os”:“ darwin”,“ arch”:“ any”}(当前:{“ os”:“ win32”,“ arch”:“ x64”})
在90.584秒钟内对进行了审核的15439个程序包发现了290个漏洞(低124个, 101 {中等,63高,2个严重)运行
npm audit fix
来修复它们, 或npm audit
表示details
谢谢