我是angular的新手。我安装了最新的Node.js并全局安装了Angular CLI。我只是从github克隆了项目,并尝试使用ng serve运行角度项目,但它向我显示了错误:
我的package.json是:
{
"name": "my-dream-app",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.0.4",
"@angular/common": "^7.0.4",
"@angular/compiler": "^7.0.4",
"@angular/core": "^7.0.4",
"@angular/forms": "^7.0.4",
"@angular/http": "^7.0.4",
"@angular/platform-browser": "^7.0.4",
"@angular/platform-browser-dynamic": "^7.0.4",
"@angular/router": "^7.0.4",
"core-js": "^2.6.9",
"rxjs": "~6.3.3",
"zone.js": "^0.8.29"
},
"devDependencies": {
"@angular/compiler-cli": "^7.0.4",
"@angular/language-service": "^7.0.4",
"@types/jasmine": "^2.8.16",
"@types/jasminewd2": "^2.0.6",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.0.6",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.4.2",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "^3.1.6"
}
}
我不知道什么是不匹配的,如何将Angual CLI与克隆的项目匹配?
答案 0 :(得分:1)
正如您所说,您只是从github下载/克隆了它并尝试立即运行它吗? 如果是这样,您可能已经忘记运行“ npm install”,这将为github-project安装必要的库。
问候阿格伦