ReferenceError: item is not defined
- Lingua principale
- JavaScript
- Stelle
- 1.6k
- Fork
- 179
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, node.js
- Ambito
- backend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100