Well, I used command "yo jhipster" to generate a monolithic application, use all the default function.
Use "yo jhipster:entity" to generate a new entity, encounter following error:
events.js:160
throw er; // Unhandled 'error' event
^
Error: Did not provide required argument name!
at constructor.<anonymous> (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/yeoman-generator/lib/base.js:383:33)
at Array.forEach (native)
at constructor.Base.checkRequiredArgs (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/yeoman-generator/lib/base.js:379:19)
at constructor.argument (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/yeoman-generator/lib/base.js:344:8)
at new constructor (/home/yhjhoo/IdeaProjects/jhipster_test/jhipster-microservice/test/node_modules/generator-jhipster/generators/entity/index.js:34:14)
at Environment.instantiate (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:328:10)
at Environment.create (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:305:15)
at Environment.run (/usr/lib/node_modules/yo/node_modules/yeoman-environment/lib/environment.js:364:24)
at /usr/lib/node_modules/yo/lib/cli.js:140:11
at Array.forEach (native)
I forgot to provide an entity name, the following command works.
$ yo jhipster:entity person
Related
Error while npm start in Windows 10
After npm install in vscode in my windows machine, I run npm, it starts but it shows the above error. I have cleaned cache but it did not solve.
I have searched on google but exception like this is not seen
events.js:180
throw er; // Unhandled 'error' event
^
This question is very similar to this one:
How can I fix ('throw er; // Unhandled 'error' event') code lifecycle?
For me personally, I fixed this exact issue by adding some missing environment variables to PATH.
C:\Windows\system32
C:\Windows
C:\Windows\System32\Wbem
I'm working in NodeJs and when trying to write file as .pdf with the help of 'fs' npm package I got some error and even pdf is not generating. I need help to jump out of this, issue is
events.js:167
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at WriteWrap.afterWrite [as oncomplete] (net.js:833:14)
Emitted 'error' event at:
at onwriteError (_stream_writable.js:431:12)
at onwrite (_stream_writable.js:456:5)
at _destroy (internal/streams/destroy.js:40:7)
at Socket._destroy (net.js:603:3)
at Socket.destroy (internal/streams/destroy.js:32:8)
at WriteWrap.afterWrite [as oncomplete] (net.js:835:10)
Code regarding this error:
let doc = await wkhtmltopdf(options, xxxx);
let file = await doc.stdout.pipe(fs.createWriteStream(`${__dirname}/${id}_init.pdf`));
Thanks in anticipation!!
I have tried re-installing fs package, changing the ports but no improvement
I think the issue may be bcz of wkhtmltopdf package too(I'm using Mac)
I suggest you make the following changes, this is working very nicely for me:
// Set url and options to whatever you wish
let doc = wkhtmltopdf(url, options);
let file = doc.pipe(fs.createWriteStream(`${__dirname}/${id}_init.pdf`));
We can't use await on either call, since neither wkhtmltopdf nor doc.pipe return promises.
You can also try writing directly to file, skipping the stream, e.g.
wkhtmltopdf('http://google.com/', { output: 'out.pdf' });
I'm trying to run the npm run dev command, but I'm getting this message:
ERROR Failed to compile with 2 errors 21:31:43
Module build failed: TypeError: loader.charAt is not a function
at ensureBang (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:180:16)
at getLoaderString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:145:18)
at getRequireString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:80:7)
at getRequire (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:71:7)
at D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:205:11
at Array.forEach (<anonymous>)
at Object.module.exports (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:198:18)
Module build failed: TypeError: loader.charAt is not a function
at ensureBang (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:180:16)
at getLoaderString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:145:18)
at getRequireString (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:80:7)
at getRequire (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:71:7)
at D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:205:11
at Array.forEach (<anonymous>)
at Object.module.exports (D:\iagof\Source\Repos\todo-list\node_modules\vue-loader\lib\loader.js:198:18)
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
This problem appeared when I tried to reinstall all the modules. Anything, my project is on Github. Follow the repository link https://github.com/iagofrota/todo-list.
(14/15) Would you like to enable internationalization support? No
? (15/15) Besides JUnit and Karma, which testing frameworks would you like to use? (Press to select, to toggle all, to inverse selection)
events.js:141
throw er; // Unhandled 'error' event
^
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode in C:\Users\panka\workspace\Hipster\generator-jhipster\generators\server\templates_README.md while compiling ejs
at Function (native)
at Object.Template.compile (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:495:12)
at Object.compile (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:306:16)
at handleCache (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:169:18)
at Object.exports.render (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\ejs\lib\ejs.js:332:10)
at copy.extend.process (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:12:18)
at applyProcessingFunc (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy.js:13:16)
at EditionInterface.exports._copySingle (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy.js:51:16)
at EditionInterface.exports.copy (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy.js:23:17)
at EditionInterface.module.exports [as copyTpl] (C:\Users\panka\workspace\Hipster\generator-jhipster\node_modules\mem-fs-editor\lib\actions\copy-tpl.js:10:8)
JHipster only supports the latest NodeJS LTS. Upgrading from v4 to v6 should fix the issue.
I am trying to debug a problem with forever/nodejs, and I get this stacktrace in the error log:
chdir(): Permission denied
events.js:72
throw er; // Unhandled 'error' event
^
Error: spawn EACCES
at errnoException (child_process.js:980:11)
at Process.ChildProcess._handle.onexit (child_process.js:771:34)
This looks to me like I should be able to look at line 980 of a file named "child_process.js" to see where the error is thrown. However, I cannot locate such a file on the system even with "find". Am I missing it somehow, or is the stracktrace lying?
It's part of the node.js source. See https://github.com/joyent/node/blob/master/lib/child_process.js. I believe you can also step directly through core node code using node's built-in debugger, or a package such as node-inspector.