obj.hasOwnProperty is not a function
shgysk8zer0 opened this issue · 7 comments
node --version
: v6.9.1npm --version
: 3.10.8myth --version
: 1.5.0
Full error:
error · TypeError: obj.hasOwnProperty is not a function
· at clone (/usr/lib/node_modules/myth/node_modules/clone-component/index.js:30:17)
· at clone (/usr/lib/node_modules/myth/node_modules/clone-component/index.js:31:23)
· at clone (/usr/lib/node_modules/myth/node_modules/clone-component/index.js:31:23)
· at Object.exports.prefixes (/usr/lib/node_modules/myth/lib/features.js:124:14)
· at /usr/lib/node_modules/myth/lib/index.js:52:33
· at Array.forEach (native)
· at /usr/lib/node_modules/myth/lib/index.js:50:22
· at Rework.use (/usr/lib/node_modules/myth/node_modules/rework/index.js:50:3)
· at myth (/usr/lib/node_modules/myth/lib/index.js:36:6)
· at /usr/lib/node_modules/myth/bin/myth:101:13
I have found that updating /usr/lib/node_modules/myth/node_modules/clone-component/index.js:30:17
to use Object.prototype.hasOwnProperty.call(obj, key)
fixes the issue.
component/clone has an update to 0.2.3 which seems to address this issue.
Hi guys,
I'm also experiencing this issue - 'obj.hasOwnProperty is not a function' - because of my node version I believe. But I can't resolve it.
I love myth but I'm having an issue after changing my dev setup. I've moved from working directly on a dev server to local machine so I've different node setups. Myth is working fine on the dev server.
Local - http://take.ms/fbyqm - has node 6
Dev Server - http://take.ms/6PO2T - has node 0.10
I've found there is a pull request on Github - #143 - but I'm unable to resolve the local issue even after updating the .travis.yml with the node version.
I appreciate that Myth is not fully supported but it'd be a shame to not resolve it. I prefer it to the preprocessors.
Thanks,
Ian.
I've done a bit of research into this, and component/clone on Github is @ 0.2.3 (which fixes the issue), while clone-component on npmjs.com is still only @ 0.2.2.
I have emailed the developer asking to update, but have gotten no reply.
Hello,
I just published my fork on npm to have a myth version working with node 6
Hi guys
Am having this same error
Has anyone found a workaround
Am using npm 6.2.0