Closed BasilioSantos closed 4 years ago
same here, please help
This is almost always an error in the underlying script. Please check the wiki. If that doesn't help, make sure to post which version of Node you're using.
I've already resolved the issue, you are right, the problem was with my certificates
@lukasbelak glad you got it figured out!
Here are the code I used to install service:
var Service = require('node-windows').Service;
// Create a new service object var svc = new Service({ name:'apiTest', description: 'api Test', script: 'C:\projetos\apiTest\index.js' });
// Listen for the "install" event, which indicates the // process is available as a service. svc.on('install',function(){ svc.start(); });
svc.install();
The following can be found in folder log file apiTest.err.log in folder daemon:
C:\projetos\criaServicoWindows\node_modules\node-windows\lib\wrapper.js:177 child.send('shutdown'); ^
TypeError: Cannot read property 'send' of null at process.killkid (C:\projetos\criaServicoWindows\node_modules\node-windows\lib\wrapper.js:177:11) at process.emit (events.js:189:13) at process.exit (internal/process/per_thread.js:168:15) at monitor (C:\projetos\criaServicoWindows\node_modules\node-windows\lib\wrapper.js:99:17) at ChildProcess. (C:\projetos\criaServicoWindows\node_modules\node-windows\lib\wrapper.js:170:5)
at Child170:5)
at ChildC:\projetos\criaServicoWindows\node_modules\node-windows\lib\wrapper.js:177
child.send('shutdown');