Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

throw new TypeError('The super constructor to "inherits" must not ' +

Tags:

node.js

npm

spdy

I am trying to build my nodejs application. but i am always getting this error.

util.js:988
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:988:11)
at Object.<anonymous> (D:\CIDE-Backend\CIDE-BACKEND\node_modules\zetta\node_modules\spdy\lib\spdy\connection.js:86:6)
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> (D:\CIDE-Backend\CIDE-BACKEND\node_modules\zetta\node_modules\spdy\lib\spdy.js:20:19)
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)
[nodemon] app crashed - waiting for file changes before starting...

i followed this solution but still i am getting same error.

my node version is 8.4.0

my npm version is 5.5.1

Can you tell me how can i solve this error.?

like image 774
Harish Mahajan Avatar asked Oct 27 '25 07:10

Harish Mahajan


1 Answers

Your dependency zetta is including an ancient version of spdy which is not compatible with you current version of Node. There is currently an open issue on zetta's github about this, which has a work around:

process.EventEmitter = require('events').EventEmitter
const zetta = require('zetta')

Your mileage may vary on that hack, I have not tested it myself. Alternatively, you could wait for the zetta team to fix their dependency or downgrade your node installation.

like image 152
Will Avatar answered Oct 29 '25 21:10

Will



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!