node.js - 无法使用最新的 Angular 版本打开旧的 Angular 项目?
问题描述
我刚刚安装了最新版本的 Node.js ( v14.16.1
) 和 Angular ( 11.2
)。
我们的 TA 给了我们 Angular 项目,但我不能ng sever
在我的机器上使用它。我收到以下错误:
An unhandled exception occurred: No projects support the 'serve' target.
See "C:\Users\Miljan\AppData\Local\Temp\ng-hVo6jS\angular-errors.log" for further details.
当我打开 时angular-errors.log
,我有以下输出:
[error] Error: No projects support the 'serve' target.
at ServeCommand.initialize (C:\Users\Miljan\AppData\Roaming\npm\node_modules\@angular\cli\models\architect-command.js:58:19)
at async ServeCommand.validateAndRun (C:\Users\Miljan\AppData\Roaming\npm\node_modules\@angular\cli\models\command.js:127:9)
at async Object.runCommand (C:\Users\Miljan\AppData\Roaming\npm\node_modules\@angular\cli\models\command-runner.js:204:24)
at async default_1 (C:\Users\Miljan\AppData\Roaming\npm\node_modules\@angular\cli\lib\cli\index.js:80:31)
在这里你可以下载TA 给我们的 Angular 项目。
下面是package.json
来自 TA 的项目:
{
"name": "blog-client",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/common": "^5.0.0",
"@angular/compiler": "^5.0.0",
"@angular/core": "^5.0.0",
"@angular/forms": "^5.0.0",
"@angular/http": "^5.0.0",
"@angular/platform-browser": "^5.0.0",
"@angular/platform-browser-dynamic": "^5.0.0",
"@angular/router": "^5.0.0",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"rxjs": "^5.5.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.5.0",
"@angular/compiler-cli": "^5.0.0",
"@angular/language-service": "^5.0.0",
"@types/jasmine": "~2.5.53",
"@types/jasminewd2": "~2.0.2",
"@types/node": "~6.0.60",
"codelyzer": "~3.2.0",
"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",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.7.0",
"typescript": "~2.4.2"
}
}
解决方案
推荐阅读
- javascript - 对象属性传播和 Object.assign
- java - 根据 String[] 索引更改字符串值
- javascript - 嵌套表的 2 窗格 crud 表视图(主表和详细表)
- python - 如何将 Python 输出从 for 循环写入文件?
- java - 在尝试连接后,我一直无法将 java.math.bigInteger 转换为 java.lang.Long
- makefile - 如何在使用并行执行时使用特定于目标的变量值并调用其他规则?
- affinity - 对大量进程设置进程亲和性
- mongodb - 在两个 MongoDb 索引中有相同的字段是多余的吗?
- aws-lambda - 如何从外部 SQS 队列活动触发 AWS Lambda 函数
- ios - 2个CGPoints之间的半圆