我試圖在npm啓動時運行一個命令,但是我收到消息:「您似乎不依賴於」@ angular/core「,這是一個錯誤 可能是什麼原因? 由於它寫在控制檯:NPM @角/核心-v它得到5.4.2您似乎不依賴於「@ angular/core」。 Typescript
我的package.json
"dependencies": {
"@angular/animations": "^4.4.3",
"@angular/common": "^4.4.3",
"@angular/compiler": "^4.4.3",
"@angular/core": "^4.4.3",
"@angular/forms": "^4.4.3",
"@angular/http": "^4.4.3",
"@angular/platform-browser": "^4.4.3",
"@angular/platform-browser-dynamic": "^4.4.3",
"@angular/router": "^4.4.3",
"applicationinsights-js": "^1.0.12",
"core-js": "^2.4.1",
"date-fns": "^1.28.5",
"deepmerge": "^1.5.1",
"fingerprintjs2": "^1.5.1",
"ng2-page-scroll": "^4.0.0-beta.9",
"ngx-mydatepicker": "2.1.2",
"rxjs": "^5.1.0",
"zone.js": "^0.8.12"
},
"devDependencies": {
"@angular/cli": "^1.4.2",
"@angular/compiler-cli": "^4.4.3",
"@angular/language-service": "^4.4.3",
"@types/applicationinsights-js": "^1.0.4",
"@types/deepmerge": "^1.3.2",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.0.1",
"gulp": "^3.9.1",
"gulp-deploy-git": "^0.5.3",
"gulp-replace": "^0.6.1",
"husky": "^0.14.3",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.1.1",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"lint-staged": "^4.0.3",
"prettier": "^1.5.3",
"protractor": "^5.1.2",
"run-sequence": "^2.1.0",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "^2.5.2"
}
npm WARN棄用[email protected]:請更新至minimatch 3.0.2或更高版本以避免RegExp DoS問題 npm WARN棄用[email protected]:請更新至minimatch 3.0.2或更高版本以避免RegExp DoS問題 npm WARN不推薦使用[email protected]:graceful-fs v3.0.0,之前在節點版本> = v7.0時會失敗。請儘快更新至[email protected]^4.0.0。使用'npm ls graceful-fs'在樹中找到它。 – danio900409
npm WARN棄用@ types/date-fns @ 2.6.0:這是date-fns的存根類型定義(https://github.com/date-fns/date-fns)。 date-fns提供了它自己的類型定義,所以你不需要安裝@ types/date-fns! npm WARN [email protected]需要@ angular/core @^2.0.0的同伴,但沒有安裝。您必須自己安裝對等關係。 npm ERR!代碼EINTEGRITY npm ERR! sha1-OWxKW/sihH + eRYJFuplfnBMMDPM =使用sha1時完整性校驗和失敗:想要sha1-OWxKW/sihH + eRYJFuplfnBMMDPM =但得到了sha1-bvi87/W75iTIMcYNmjbLWU5LxCw =。 (360058字節) – danio900409
嗯,我編輯並添加了兩行,你可以嘗試。 –