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

Project is Broken when using Node v11.1.0 #368

Open
lsntech opened this issue Nov 20, 2018 · 6 comments
Open

Project is Broken when using Node v11.1.0 #368

lsntech opened this issue Nov 20, 2018 · 6 comments

Comments

@lsntech
Copy link

lsntech commented Nov 20, 2018

Looks there are something broken on this project, im trying to run it and getting this error:

PS L:\projetos\zozo> node app.js
util.js:291
throw new ERR_INVALID_ARG_TYPE('superCtor', 'Function', superCtor);
^

TypeError [ERR_INVALID_ARG_TYPE]: The "superCtor" argument must be of type Function. Received type undefined
at Object.inherits (util.js:291:11)
at Object. (L:\projetos\zozo\node_modules\spdy\lib\spdy\connection.js:86:6)
at Module._compile (internal/modules/cjs/loader.js:707:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:718:10)
at Module.load (internal/modules/cjs/loader.js:605:32)
at tryModuleLoad (internal/modules/cjs/loader.js:544:12)
at Function.Module._load (internal/modules/cjs/loader.js:536:3)
at Module.require (internal/modules/cjs/loader.js:643:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object. (L:\projetos\zozo\node_modules\spdy\lib\spdy.js:20:19)

trying to run this code from tutorial:

var zetta = require('zetta');

zetta()
.name('FirstName LastName')
.listen(1337, function(){
console.log('Zetta is running at http://127.0.0.1:1337');
});

@AdamMagaluk
Copy link
Collaborator

There may be issues with compatibility with the latest versions of Node.js. Supported up to v6 for now.

Which version of Node.js are you running?

@lsntech
Copy link
Author

lsntech commented Nov 22, 2018

Hi,
Node: v11.1.0
Npm: 6.4.1

@sealedair-elliott
Copy link

@lsntech workaround is to add this before requiring zetta:

process.EventEmitter = require('events').EventEmitter; // add this line
const zetta = require('zetta');

@AdamMagaluk AdamMagaluk changed the title Project is Broken Project is Broken when using Node v11.1.0 Jan 4, 2019
@geekdk
Copy link

geekdk commented Dec 5, 2019

@sealedair-elliott Thanks for your update, It did work for me.

@wind13
Copy link

wind13 commented Jun 5, 2020

Should update the document then.

@AdamMagaluk
Copy link
Collaborator

Opened a new PR since i lost access to the repo after leaving Google. #379

I also published version [email protected] that incorporates all these changes. The latest version of Zetta should work with Node.js 18 and other newer versions of Node.

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

No branches or pull requests

5 participants