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

Unhandled Error when begin to generate #133

Closed
metcoder95 opened this issue Nov 23, 2017 · 7 comments
Closed

Unhandled Error when begin to generate #133

metcoder95 opened this issue Nov 23, 2017 · 7 comments
Labels

Comments

@metcoder95
Copy link

When I start to generate, after completing the form, I have this issue:

events.js:193
      throw er; // Unhandled 'error' event
      ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at randomBytes (internal/crypto/random.js:44:11)
    at Object.options.source (/home/metcoder/.nvm/versions/node/v9.0.0/lib/node_modules/generator-rest/node_modules/rand-token/index.js:61:18)
    at Object.generate (/home/metcoder/.nvm/versions/node/v9.0.0/lib/node_modules/generator-rest/node_modules/rand-token/index.js:96:29)
    at /home/metcoder/.nvm/versions/node/v9.0.0/lib/node_modules/generator-rest/generators/app/index.js:98:40
    at <anonymous>

I updated the package and yeoman and continue with this problem.

@maustand maustand added the bug label Nov 23, 2017
@maustand
Copy link
Collaborator

HI
Probably there is a unexpected error with the last merge , where we updated crypto to the last version for support nodejs 9.

anyway let me check in this weekend and see what it is happening !

Probably it is referenced to this bug

@Ikramhassan
Copy link

I am facing the same problem. When i select Yes for the following question I get this error.
? Do you want the retrieve methods from users (GET) to have the form { rows, co
unt } ? Yes
events.js:136
throw er; // Unhandled 'error' event
^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
at randomBytes (internal/crypto/random.js:44:11)
at Object.options.source (C:\Users\ikram\AppData\Roaming\npm\node_modules\generator-rest\node_modules\rand-token\index.js:61:18)
at Object.generate (C:\Users\ikram\AppData\Roaming\npm\node_modules\generator-rest\node_modules\rand-token\index.js:96:29)
at C:\Users\ikram\AppData\Roaming\npm\node_modules\generator-rest\generators\app\index.js:98:40
at

@maustand
Copy link
Collaborator

@Ikramhassan could you let me know what nodejs version do you have in your env ?

@Ikramhassan
Copy link

v9.2.0.

@maustand
Copy link
Collaborator

@diegohaz Hi diego, could you make a deploy ?

This bug is related to this pull request that it resolves the problem..

@Ikramhassan if you dont want to wait for the deploy, just you should update the last version of crypto in your local env and it should work.

Regards

@diegohaz
Copy link
Owner

Sure. Publishing new version right now.

@diegohaz
Copy link
Owner

v0.11.1 released

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

No branches or pull requests

4 participants