Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The super constructor to "inherits" must not be null or undefined #6

Closed
adius opened this issue Apr 2, 2017 · 8 comments · Fixed by #7
Closed

The super constructor to "inherits" must not be null or undefined #6

adius opened this issue Apr 2, 2017 · 8 comments · Fixed by #7

Comments

@adius
Copy link

adius commented Apr 2, 2017

ledger-rest --port 1234 --file main.ledger
util.js:973
    throw new TypeError('The super constructor to "inherits" must not ' +
    ^

TypeError: The super constructor to "inherits" must not be null or undefined
    at Object.exports.inherits (util.js:973:11)
    at Object.<anonymous> (/usr/local/lib/node_modules/ledger-rest/node_modules/spdy/lib/spdy/connection.js:86:6)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at Module.require (module.js:498:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/local/lib/node_modules/ledger-rest/node_modules/spdy/lib/spdy.js:20:19)
@TomK32
Copy link

TomK32 commented Apr 21, 2017

I tried this commit and found it worked. Can @slashdotdash merge it in? https://github.com/ioddly/node-ledger-rest/commit/7dab33c0be0cb888c9cfbe72821d52f194c5af0a

Helps me to upgrade node-ledger-rest to node 7.

@Sunillabs108
Copy link

Sunillabs108 commented Apr 27, 2017

I am getting same error with restify on node v7.8.0. Please suggest fix for the same
TypeError: The super constructor to "inherits" must not be null or undefined
at Object.exports.inherits (util.js:973:11)
at Object. (/Users/sunilbhatia/javascripting/TeddyCloud/node_modules/restify/node_modules/spdy/lib/spdy/connection.js:86:6)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/Users/user1/javascripting/TeddyCloud/node_modules/restify/node_modules/spdy/lib/spdy.js:20:19)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)

@burakkilic
Copy link

@Sunillabs108 npm install restify@4.3.0 --save fixes the issue.

@huleile
Copy link

huleile commented Aug 30, 2017

I am getting same error on node v6.3.1 with child_process.execSync(cmd,{
cwd: path.normalize(path.join(__dirname, '..')),
env: {"NODE_ENV": process.env.NODE_ENV},
stdio: 'inherit'
});

Please suggest fix for the same ,Thanks
`util.js:951
throw new TypeError('The super constructor to "inherits" must not ' +
^

TypeError: The super constructor to "inherits" must not be null or undefined
at Object.exports.inherits (util.js:951:11)
at Object. (/opt/www/emba/newpubsub/node_modules/_redis@2.7.1@redis/lib/customErrors.js:42:6)
at Module._compile (module.js:541:32)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .js] (/opt/www/emba/newpubsub/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:152:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
at Function.Module._load (module.js:409:3)
at Module.require (module.js:468:17)
at require (internal/module.js:20:19)
at Object. (/opt/www/emba/newpubsub/node_modules/_redis@2.7.1@redis/index.js:9:20)
at Module._compile (module.js:541:32)
at Module._extensions..js (module.js:550:10)
at Object.require.extensions.(anonymous function) [as .js] (/opt/www/emba/newpubsub/node_modules/_babel-register@6.26.0@babel-register/lib/node.js:152:7)
at Module.load (module.js:458:32)
at tryModuleLoad (module.js:417:12)
{ Error: Command failed: /home/ubuntu/.nvm/versions/node/v6.3.1/bin/node /opt/www/emba/newpubsub/DB/V2_4_4__add_permission_live.js
at checkExecSyncError (child_process.js:475:13)
at Object.execSync (child_process.js:515:13)
at update (/opt/www/emba/newpubsub/DB/copySql.js:142:27)
at next (native)
at onFulfilled (/opt/www/emba/newpubsub/node_modules/_co@4.6.0@co/index.js:65:19)
error: null,
cmd: '/home/ubuntu/.nvm/versions/node/v6.3.1/bin/node /opt/www/emba/newpubsub/DB/V2_4_4__add_permission_live.js',
file: '/bin/sh',
args:
[ '/bin/sh',
'-c',
'/home/ubuntu/.nvm/versions/node/v6.3.1/bin/node /opt/www/emba/newpubsub/DB/V2_4_4__add_permission_live.js' ],
options:
{ cwd: '/opt/www/emba/newpubsub',
env: { NODE_ENV: 'production' },
stdio: [ [Object], [Object], [Object] ],
shell: true,
file: '/bin/sh',
args:
[ '/bin/sh',
'-c',
'/home/ubuntu/.nvm/versions/node/v6.3.1/bin/node /opt/www/emba/newpubsub/DB/V2_4_4__add_permission_live.js' ]`

@harishmahajan
Copy link

still i am getting same error....
my version
node = 8.4.0
npm = 5.5.1

@krishnapsarthi
Copy link

krishnapsarthi commented Nov 16, 2017

I am also getting same error on node v8.8.1 running statsd.

util.js:971
throw new TypeError('The super constructor to "inherits" must not ' +
^

TypeError: The super constructor to "inherits" must not be null or undefined

Any solution on this?

@wactbprot
Copy link

wactbprot commented Nov 23, 2017

Same here at:

node --version
v8.9.1

error is:

util.js:971
    throw new TypeError('The super constructor to "inherits" must not ' +
    ^

TypeError: The super constructor to "inherits" must not be null or undefined
    at Object.inherits (util.js:971:11)
    at Object.<anonymous> (--/node_modules/spdy/lib/spdy/connection.js:86:6)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Module.require (module.js:579:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (--node_modules/spdy/lib/spdy.js:20:19)

Thank you!

@denizdogan
Copy link

denizdogan commented Dec 1, 2017

@wactbprot I have the exact same error as you (down to util.js:971:11), but I don't even use this package, nor do I use spdy. I found this issue just by googling the error message, but I think the problem arises from readable-stream, see https://github.com/nodejs/readable-stream/blob/f81f716335c7c5f500618c7ee8fd29e08b1cf2b5/lib/_stream_duplex.js#L53

I'm experiencing this problem when I'm using Rollup to bundle my application. There is an old issue with a bit of discussion about the cause: nodejs/readable-stream#237

What solved the problem for me personally was using rollup-plugin-node-builtins

Hopefully this helps someone somewhere :)

util.js:971
    throw new TypeError('The super constructor to "inherits" must not ' +
    ^

TypeError: The super constructor to "inherits" must not be null or undefined
    at Object.inherits (util.js:971:11)
    at Object.<anonymous> (/Users/deniz/Code/my-project/dist/bundle.js:20234:8)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants