Fro*_*ude 11 angular-cli angular
尝试从Angular开始,在CLI中创建项目后,我尝试同时使用“ ng serve -o”或“ npm start”打开项目,但出现以下错误:
架构验证失败,出现以下错误:数据路径“”不应具有其他属性(es5BrowserSupport)
尝试过:重新创建具有类似结果的项目
重新安装CLI
错误日志:
0信息,如果一切正常就可以了
1详细的cli ['C:\ Program Files \ nodejs \ node.exe',
1个详细的cli'C:\ Program Files \ nodejs \ node_modules \ npm \ bin \ npm-cli.js',
1详细cli'start']
2信息使用npm@6.4.1
3信息使用node@v10.15.0
4详细的运行脚本['prestart','start','poststart']
5个信息生命周期ccctool@0.0.0~prestart:ccctool@0.0.0
6个信息生命周期ccctool@0.0.0~start:ccctool@0.0.0
7详细的生命周期ccctool@0.0.0~start:生命周期中的unsafe-perm true
8个详细的生命周期ccctool@0.0.0~start:PATH:C:\ ProgramFiles \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ node-gyp-bin; C:\ Users \ User \ Desktop \ CCCTool \ node_modules.bin ; C:\ Program Files(x86)\ Razer Chroma SDK \ bin; C:\ Program Files \ Razer Chroma SDK \ bin; C:\ Windows \ system32; C:\ Windows; C:\ Windows \ System32 \ Wbem; C :\ Windows \ System32 \ WindowsPowerShell \ v1.0 \; C:\ Program Files(x86)\ NVIDIA Corporation \ PhysX \ Common; C:\ Windows \ system32 \ config \ systemprofile \ AppData \ Local \ Microsoft \ WindowsApps; C: \ Program Files \ Intel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C:\ WINDOWS \ system32; C:\ WINDOWS; C:\ WINDOWS \ System32 \ Wbem; C:\ WINDOWS \ System32 \ WindowsPowerShell \ v1.0 \; C:\ WINDOWS \ System32 \ OpenSSH \; C:\ Program Files \ PuTTY \; C:\ Program Files \ nodejs \; C:\ Users \ User \ AppData \ Local \ Microsoft \ WindowsApps; C:\ Program Files \ Intel \ WiFi \ bin \; C:\ Program Files \ Common Files \ Intel \ WirelessCommon \; C:\ Users \ User \ AppData \ Roaming \ npm; C:\ Users \ User \ AppData \ Local \ Programs \ Microsoft VS Code \ bin
9详细生命周期ccctool@0.0.0~start:CWD:C:\ Users \ User \ Desktop \ CCCTool
10愚蠢的生命周期ccctool@0.0.0~start:Args:['/ d / s / c','ng serve']
11愚蠢的生命周期ccctool@0.0.0~start:返回:代码:1信号:空
12信息生命周期ccctool@0.0.0~start:无法执行启动脚本
13详细堆栈错误:ccctool@0.0.0开始: ng serve
13详细堆栈退出状态1
EventEmitter的13个详细堆栈。(C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ index.js:301:16)
EventEmitter.emit的13个详细堆栈(events.js:182:13)
ChildProcess上的13个详细堆栈。(C:\ Program Files \ nodejs \ node_modules \ npm \ node_modules \ npm-lifecycle \ lib \ spawn.js:55:14)
ChildProcess.emit的13个详细堆栈(events.js:182:13)
13个详细的堆栈在mayyClose(internal / child_process.js:962:16)
Process.ChildProcess._handle.onexit上的13个详细堆栈(internal / child_process.js:251:5)
14详细的pkgid ccctool@0.0.0
15详细的CWD C:\ Users \ User \ Desktop \ CCCTool
16详细的Windows_NT 10.0.17763
17详细argv“ C:\ Program Files \ nodejs \ node.exe”“ C:\ Program Files \ nodejs \ node_modules \ npm \ bin \ npm-cli.js”“开始”
18个详细节点v10.15.0
19详细npm v6.4.1
20个错误代码ELIFECYCLE
21错误errno 1
22错误ccctool@0.0.0开始: ng serve
22错误退出状态1
23错误在ccctool@0.0.0启动脚本处失败。
23错误这可能不是npm的问题。上面可能还有其他日志记录输出。
24详细出口[1,正确]
Rak*_*hat 14
在angular.json中安装@angular/cli@7.3.0并@angular-devkit/build-angular@0.13.0支持es5BrowserSupport选项
es5BrowserSupport 添加其他polyfill
解决方案1
For option es5BrowserSupport your @angular/cli required minimum version 7.3 and @angular-devkit/build-angular required minimum version 0.13 .
Check your @angular/cli version. if is less than 7.3 then run following command
ng update @angular/cli
Check your @angular-devkit/build-angular version. if is less than 0.13 then run following command
ng update @angular-devkit/build-angular
Solution 2
Also you can edit angular.json file and find "es5BrowserSupport": true and comment it. It will also work without updating dependency
小智 7
将新的应用程序添加到现有工作区后,我遇到了同样的问题。经过一番研究,我意识到错误试图告诉我的是我的angular.json中有一个不受支持的选项,在这种情况下,是'es5BrowserSupport'选项。搜索完我的angular.json,并从应用程序架构师/构建/选项部分中删除了“ es5BroswerSupport”选项之后,我便能够构建并提供服务。
我有cli 7.3的Angular 7.2.3。
| 归档时间: |
|
| 查看次数: |
9934 次 |
| 最近记录: |