ovh / node-ovh

Node.js wrapper for the OVH APIs
http://ovh.github.io/node-ovh
Other
129 stars 27 forks source link

Proxy.create is not a function with nodeJS v6 #9

Closed jfroffice closed 8 years ago

jfroffice commented 8 years ago

The callstack

    return Proxy.create(handler);
                 ^

TypeError: Proxy.create is not a function
    at Ovh.createRootProxy (/Users/user/Projects/xxxx/node_modules/ovh/lib/ovh.js:226:18)
    at new Ovh (/Users/user/Projects/xxxx/node_modules/ovh/lib/ovh.js:89:19)
    at module.exports (/Users/user/Projects/xxxx/node_modules/ovh/lib/ovh.js:658:12)
    at Object.<anonymous> (/Users/user/Projects/xxxx/service/helper/ovh/mailingList.js:7:25)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:456:32)
    at tryModuleLoad (module.js:415:12)
    at Function.Module._load (module.js:407:3)
    at Module.require (module.js:466:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/Users/user/Projects/xxxx/service/helper/ovh/mailingLists.js:3:15)
    at Module._compile (module.js:541:32)
    at Object.Module._e
bnjjj commented 8 years ago

Thanks for your feedback, we're actually working to remove the dependency of this "Proxy" object. The node version 6 is very recent so it's not already update for this version.

fgirardey commented 8 years ago

+1, Node.js V6 is now released since 30 days 😅

fgirardey commented 8 years ago

I'm currently considering other SMS providers over OVH because of that not so active support

bnjjj commented 8 years ago

It's not abandoned. Could you tell me what's your usage of this API ?

Do you use in the mode :

ovh.request('GET', '/me', function (err, me) {
  console.log(err || me);
});

Or in this mode :

ovh.me.$get(function (err, me) {
  console.log(err || me);
});
fgirardey commented 8 years ago

I used the first mode

bnjjj commented 8 years ago

Alright for the next week I'll release a major version without Proxy mode support :)

bnjjj commented 8 years ago

Pull request submited #10 with an addition of promise support :)

fgirardey commented 8 years ago

Very good ! The promise support perfectly match my coding flow. Thank you, can't wait for the release !

bnjjj commented 8 years ago

Here it is, the V2.0.0 is out now https://www.npmjs.com/package/ovh

Let me know if it fits your usage :)

jfroffice commented 8 years ago

works for me.