您似乎不依赖于"@ angular/core".打字稿 [英] You seem to not be depending on "@angular/core". Typescript
本文介绍了您似乎不依赖于"@ angular/core".打字稿的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在npm start上运行命令,但收到消息:您似乎不依赖于@ angular/core.这是一个错误. 可能是什么原因? 正如它在控制台中所写的那样:npm @ angular/core -v,它得到5.4.2
I'm trying to run a command at npm start, but I get the message: "You seem to be not dependent on" @angular/core ". This is an error. What could be the reason? As it writes in the console: npm @angular/core -v it gets 5.4.2
我的package.json
My 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"
}
推荐答案
我遇到相同的问题来解决此问题,您要做的就是
I encountered the same issue to resolve this all you need to do is to
cd <project_name>
,然后运行以下命令:
npm update
然后项目将被成功编译.
and than the project will be succesfully compiled.
这篇关于您似乎不依赖于"@ angular/core".打字稿的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文