Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角度:未定义不可iterable(无法读取属性符号(Symbol.iterator))_Angular_Ngrx - Fatal编程技术网

Angular 角度:未定义不可iterable(无法读取属性符号(Symbol.iterator))

Angular 角度:未定义不可iterable(无法读取属性符号(Symbol.iterator)),angular,ngrx,Angular,Ngrx,我正在运行一个ngrx hello world,它运行得非常好 但是,将项目下载到本地,npm安装&npm运行启动,它不起作用 它是投掷: ➜ angular-ngrx npm run build > nlrxbbygykj.angular@0.0.0 build /Users/will/Documents/Node/angular-ngrx > ng build Compiling @angular/core : es2015 as esm2015 Error: Error

我正在运行一个ngrx hello world,它运行得非常好

但是,将项目下载到本地,
npm安装
&
npm运行启动
,它不起作用

它是投掷:

➜  angular-ngrx npm run build

> nlrxbbygykj.angular@0.0.0 build /Users/will/Documents/Node/angular-ngrx
> ng build

Compiling @angular/core : es2015 as esm2015
Error: Error on worker #1: TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at __read (/Users/will/Documents/Node/angular-ngrx/node_modules/tslib/tslib.js:174:50)
    at Object.__spread (/Users/will/Documents/Node/angular-ngrx/node_modules/tslib/tslib.js:193:28)
    at Renderer.renderAdjacentStatements (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:159:63)
    at /Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:80:52
    at Array.forEach (<anonymous>)
    at Renderer.renderFile (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:76:46)
    at /Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:53:84
    at Array.forEach (<anonymous>)
    at Renderer.renderProgram (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/rendering/renderer.js:48:54)
    at Transformer.transform (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/packages/transformer.js:84:42)
    at ClusterMaster.onWorkerMessage (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:195:27)
    at /Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:55:95
    at ClusterMaster.<anonymous> (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:293:57)
    at step (/Users/will/Documents/Node/angular-ngrx/node_modules/tslib/tslib.js:143:27)
    at Object.next (/Users/will/Documents/Node/angular-ngrx/node_modules/tslib/tslib.js:124:57)
    at /Users/will/Documents/Node/angular-ngrx/node_modules/tslib/tslib.js:117:75
    at new Promise (<anonymous>)
    at Object.__awaiter (/Users/will/Documents/Node/angular-ngrx/node_modules/tslib/tslib.js:113:16)
    at EventEmitter.<anonymous> (/Users/will/Documents/Node/angular-ngrx/node_modules/@angular/compiler-cli/ngcc/src/execution/cluster/master.js:287:32)
    at EventEmitter.emit (events.js:315:20)
An unhandled exception occurred: NGCC failed.
See "/private/var/folders/10/zlppkg794_x8shqsklqs_9rc0000gn/T/ng-Ub1Ik1/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! nlrxbbygykj.angular@0.0.0 build: `ng build`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the nlrxbbygykj.angular@0.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
➜  角度ngrx npm运行构建
>NLRxBYGYKJ。angular@0.0.0构建/用户/意愿/文件/节点/角度ngrx
>ng构建
将@angular/core:es2015编译为esm2015
错误:worker#1上的错误:TypeError:undefined不可iterable(无法读取属性符号(Symbol.iterator))
读取时(/Users/will/Documents/Node/angular ngrx/Node_modules/tslib/tslib.js:174:50)
在Object.\u spread(/Users/will/Documents/Node/angular ngrx/Node\u modules/tslib/tslib.js:193:28)
位于Renderer.renderAdjacentStatements(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/rendering/Renderer.js:159:63)
at/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/rendering/renderer.js:80:52
在Array.forEach()处
位于Renderer.renderFile(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/rendering/Renderer.js:76:46)
at/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/rendering/renderer.js:53:84
在Array.forEach()处
在Renderer.renderProgram(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/rendering/Renderer.js:48:54)
在Transformer.transform(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/packages/Transformer.js:84:42)
位于ClusterMaster.onWorkerMessage(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/execution/cluster/master.js:195:27)
at/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/execution/cluster/master.js:55:95
在ClusterMaster。(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/execution/cluster/master.js:293:57)
在步骤(/Users/will/Documents/Node/angular ngrx/Node_modules/tslib/tslib.js:143:27)
在Object.next(/Users/will/Documents/Node/angular ngrx/Node_modules/tslib/tslib.js:124:57)
at/Users/will/Documents/Node/angular ngrx/Node_modules/tslib/tslib.js:117:75
在新的承诺()
at Object.u waiter(/Users/will/Documents/Node/angular ngrx/Node_modules/tslib/tslib.js:113:16)
在黄昏时分。(/Users/will/Documents/Node/angular ngrx/Node_modules/@angular/compiler cli/ngcc/src/execution/cluster/master.js:287:32)
在EventEmitter.emit(events.js:315:20)
发生未处理的异常:NGCC失败。
有关详细信息,请参阅“/private/var/folders/10/zlppkg794_x8shqsklqs_9rc0000gn/T/ng-Ub1Ik1/angular errors.log”。
npm错误!代码失效循环
npm错误!系统调用生成
npm错误!锉刀
npm错误!厄尔诺·埃诺特
npm错误!NLRxBYGYKJ。angular@0.0.0build:`ng build`
npm错误!产卵期
npm错误!
npm错误!在NLRXBYGYKJ上失败。angular@0.0.0构建脚本。
npm错误!这可能不是npm的问题。上面可能还有其他日志输出。
npm错误!此运行的完整日志可在以下位置找到:
npm安装过程中没有错误。。。 更改tsconfig.json也不起作用


提前谢谢

您使用的是旧的nodejs版本吗?我使用的是node
v12.18.3
,npm是
6.14.6