1602 / 1602/compound

ReferenceError: item is not defined

Abierto
#624 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
JavaScript
Estrellas
1.6k
Forks
179
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
javascript, node.js
Área
backend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.