1602 / 1602/compound

ReferenceError: item is not defined

Offen
#624 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
1.6k
Forks
179
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js
Bereich
backend
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.