question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Got an error in 1.4.11 - "Cannot read property 'name' of undefined"

See original GitHub issue
/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/utils.js:33
  var skinClassName = 'Skin' + NativeClass.name;
                                          ^
TypeError: Cannot read property 'name' of undefined
  at makeSkinClass (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/utils.js:33:43)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/admin.js:18:37)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/db.js:20:17)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/mongo_client.js:5:14)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at /home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/index.js:25:15
  at Array.forEach (native)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/lib/index.js:24:80)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/node_modules/mongoskin/index.js:1:132)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/node_modules/livedb-mongo/mongo.js:2:17)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/server/store.js:10:17)
  at Object.<anonymous> (/home/zag2art/work/idg/node_modules/local-derby-server/server/store.js:114:4)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (/home/zag2art/work/idg/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at module.exports (/home/zag2art/work/idg/node_modules/local-derby-server/server/index.js:61:13)
  at Object.derbyServer.run (/home/zag2art/work/idg/node_modules/local-derby-server/index.js:64:33)
  at module.exports (/home/zag2art/work/idg/src/server/index.coffee:19:22)
  at Object.<anonymous> (/home/zag2art/work/idg/server.js:13:26)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:902:3

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:29 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
kimeshancommented, Mar 24, 2015

@iposton I changed the mongoskin version in my monk dependencies:

This is in my package.json inside node_modules/monk: “dependencies”: { “debug”: “*”, “mongoskin”: “^1.3.20”, “mpromise”: “0.5.1” }

Alternatively, just navigate to node_modules/monk in your shell, then do: npm uninstall mongoskin --save npm install mongoskin@1.3.20 --save

This will automatically change your mongoskin version and update the package.json.

This gets Monk to work. Monk requires Mongoskin and it seems that the latest push of Mongoskin is broken due to the NativeClass error here. So changing to 1.3.20 will tell npm to pull the previous working version of Mongoskin, which Monk can work with.

Hope that helps.

1reaction
vikrampariharcommented, Apr 26, 2016

@kimeshan Thank you so much! Installing mongoskin version 1.3.20 helped me to solve this problem!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

"error": "message": "Cannot read property 'name' of undefined"
So, I'm trying to create a route and I created a route that should manage to POST data and I have been testing...
Read more >
typeerror: cannot read property 'safeareaprovidercompat' of ...
When the template get initialized, the product is undefined and it continues until the response return from API. Add a check for the...
Read more >
Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
Cannot read property 'name' of undefined' mean? - Quora
It simply means the variable you are doing .map on is not an array, map is a function defined for arrays, you have...
Read more >
Error Message "Cannot read property 'name' of undefined "
Error Message "Cannot read property 'name' of undefined " · Right click on the email · Choose "Inspect" · Under "Console" look for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found