ReferenceError: item is not defined
- 主要言語
- JavaScript
- スター
- 1.6k
- フォーク
- 179
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
I'm getting this error in the project I'm working on:
```
project|master⚡ ⇒ node .
Failed to load c++ bson extension, using pure JS version
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
/home/user/projects/client/project/node_modules/compound/lib/server/structure.js:121
for (var i in item.prototype) {
^
ReferenceError: item is not defined
at readNode (/home/user/projects/client/project/node_modules/compound/lib/server/structure.js:121:35)
at Array.forEach (native)
at read (/home/user/projects/client/project/node_modules/compound/lib/server/structure.js:92:33)
at /home/user/projects/client/project/node_modules/compound/lib/server/structure.js:73:21
at Array.forEach (native)
at CompoundServer.loadStructure (/home/user/projects/client/project/node_modules/compound/lib/server/structure.js:71:36)
at CompoundServer.initCompound (/home/user/projects/client/project/node_modules/compound/lib/compound.js:145:18)
at CompoundServer.initCompoundServer [as init] (/home/user/projects/client/project/node_modules/compound/lib/server/compound.js:54:29)
at /home/user/projects/client/project/node_modules/compound/lib/compound.js:84:22
at process._tickCallback (node.js:419:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:906:3
```
Everything works like a charm after I issue `npm install`, app works for a while, and then for unknown reason it breaks with all this stuff in stdout. I'm using `compound@1.1.13-1` with node v0.10.28,
Any ideas?
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
The error occurs in compound/lib/server/structure.js at line 121 where 'item' is not defined. Start by examining the readNode function and its context to understand how 'item' should be declared. Check the loop structure and variable scope. Run the project to reproduce the error, then trace through the loadStructure initialization to see what triggers the undefined variable.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, node.js
- 領域
- backend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100