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
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>
and then run the following command:
npm update
and than the project will be succesfully compiled.