mikeal / r2

HTTP client. Spiritual successor to request.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

require.extensions.hasOwnProperty is not a function

nacimgoura opened this issue · comments

Hello,
I installed r2 on my computer with nodejs 8.4.0 but when I do a npm start I have this error.

/home/ngoura/projet/testnacim/node_modules/require-dir/index.js:93
            if (!require.extensions.hasOwnProperty(ext)) {
                                    ^

TypeError: require.extensions.hasOwnProperty is not a function
    at requireDir (/home/ngoura/projet/testnacim/node_modules/require-dir/index.js:93:37)
    at Object.<anonymous> (/home/ngoura/projet/testnacim/node_modules/r2/index.js:19:1)
    at Module._compile (module.js:573:30)
    at Object.Module._extensions..js (module.js:584:10)
    at Module.load (module.js:507:32)
    at tryModuleLoad (module.js:470:12)
    at Function.Module._load (module.js:462:3)
    at Module.require (module.js:517:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/home/ngoura/projet/testnacim/app/controllers/proxy.controller.js:11:7)

So I can't use this package 😞

it's not on npm yet ;)

that's a different package, working on getting the name.

@mikeal I'd say you should add a warning in the readme about this, just in case. Because of the "popularity" of this repo (3,000+ stars), people will assume require('r2') in the readme in fact means you own that package name on the registry.