Closed endm closed 1 year ago
Are you importing node-windows directly, i.e. require('node-windows')
? The issue you're experiencing is one I came across in development, but only when using local references (i.e. require('../')
).
This is my install.js. It's the same as example.
var Service = require('node-windows').Service;
var dir = require('path').join(process.cwd(), 'app.js')
var svc = new Service({
name:'SielconBDCasino',
description: 'Sielcon BD Casino (MQTT Broker)',
script: dir,
env:{
name: "NODE_ENV",
value: "production"
}
});
// Listen for the "install" event, which indicates the
// process is available as a service.
svc.on('install',function(){
svc.start();
});
// Just in case this file is run twice.
svc.on('alreadyinstalled',function(){
console.log('This service is already installed.');
});
// Listen for the "start" event and let us know when the
// process has actually started working.
svc.on('start',function(){
console.log(svc.name+' started!');
});
// Install the script as a service.
console.log("Installing to", dir)
svc.install();
I am experiencing the same issue. I could not make it work with version 1.0.0-beta.7
, instead I had to force version 1.0.0-beta,6
.
I am not sure about this but it seems that lib/wrapper.js
contains a typo when importing the Args = require('@author.io/args')
.
Unless I am missing something, that line should reference @author.io/arg
instead
I am experiencing the same issue. I could not make it work with version 1.0.0-beta.7, instead I had to force version 1.0.0-beta,6.
me too
I am experiencing the same issue. I could not make it work with version
1.0.0-beta.7
, instead I had to force version1.0.0-beta,6
.
Same here
I am experiencing the same issue. I could not make it work with version 1.0.0-beta.7, instead I had to force version 1.0.0-beta,6.
Same
Thanks!!!! I'm using V1.0.0-beta.6 now, and it's working!!!
;)
There is a typo in the wrapper file causing this problem... but there is also a conflict. The arg lib uses ESM-only, while this module still supports CommonJS.
I will create a CJS version of the arg lib to resolve this problem for now, but it will take me a day or two. In the meantime, I recommend using 1.0.0-beta.6 until that is complete.
I've also started a discussion to capture community feedback regarding the direction of this project. Please comment at https://github.com/coreybutler/node-windows/discussions/309#discussion-3955262.
Downgrading to 1.0.0-beta.6 solved it for me
same here
Is there any update on this one lately?
I've been backed up with client projects. I've done part of the arg lib conversion, but am not finished yet.
Hi I read that on April 6th the 1.0.0.beta.7 version should have been fixed. But I have just installed the package on a fresh VM and I still see the error 1067 issue when starting the service.
file *.err.log shows "Error: Cannot find module '@author.io/args'"
Am I missing anything?
Thanks a lot for your valuable work
Hi I read that on April 6th the 1.0.0.beta.7 version should have been fixed. But I have just installed the package on a fresh VM and I still see the error 1067 issue when starting the service.
file *.err.log shows "Error: Cannot find module '@author.io/args'"
Am I missing anything?
Thanks a lot for your valuable work
I still see the issue too, others have said beta 6 works so im downgrading and trying it now
Reverting to beta 6 does work, however, shows vulnerability errors due to the optimist package dependency. Does anyone know of a workaround for the vulnerability?
Reverting to beta 6 does work, however, shows vulnerability errors due to the optimist package dependency. Does anyone know of a workaround for the vulnerability?
Reverting to beta 6 works, but for auto-updating systems it requires manual intervention.
A fixed beta 7 or a fresh beta 8 would be greatly appreciated :-)
I am experiencing the same issue. I could not make it work with version 1.0.0-beta.7, instead I had to force version 1.0.0-beta,6.
Exact same
@coreybutler Would Yargs be a suitable replacement? The license is compatible.
@baconbrad I'm sure yargs would work, but it has a lot of dependencies. I wrote the author/arg lib (no dependencies). If another security vulnerability comes up, I can address it (unlike other libraries).
I know folks want this fixed. I want to fix it... but client work is taking precedence at the moment.
@coreybutler Understandable. I didn't initially realize the aim was for a dependency free parser and thought it was just to ditch a known vulnerable one.
@coreybutler - this is a fantastic project !
Just managed to get 1.0.0-beta.6 working 1.0.0-beta.7 has the Cannot find module '@author.io/args' issue
I know folks want this fixed. I want to fix it... but client work is taking precedence at the moment.
tell me about it ;)
I will wait patiently for 1.0.0-beta.8
I am experiencing the same issue. I could not make it work with version 1.0.0-beta.7 or 1.0.0-beta.6 either.
For other noobs like me looking to reinvent the same solution of rolling back to 1.0.0-beta.6 Do the the following:
cd c:\path\to\index.js
npm uninstall -g node-windows
npm install -g node-windows@1.0.0-beta.6
npm link node-windows
Then review your package.json file to ensure the correct node-windows version is listed in the dependencies section.
Also, I noticed that '@author.io/args' version 1.3.22, the one used in node-windows package.json, is actually in empty folder when you install it with npm.
In other words it's missing index.js.
If you upgrade to 1.3.23 index.js can be found.
Rollbacking to beta 6 for now.
ping
as of july 2022 it's still an issue...
@Fearodin - death in the family. Please be patient.
@coreybutler uff sry bro, my condolences!
@Fearodin - death in the family. Please be patient.
my condolences
@Fearodin - death in the family. Please be patient.
I landed to this page for obvious reason. But sorry to hear, my condolences.
For other noobs like me looking to reinvent the same solution of rolling back to 1.0.0-beta.6 Do the the following:
cd c:\path\to\index.js npm uninstall -g node-windows npm install -g node-windows@1.0.0-beta.6 npm link node-windows
Then review your package.json file to ensure the correct node-windows version is listed in the dependencies section.
For who trying this, just incase it not auto delete files after uninstall, before start install 1.0.0-beta.6, we can double check and manual remove at C:\Users{your_login}\AppData\Roaming\npm\node_modules\node-windows\
For other noobs like me looking to reinvent the same solution of rolling back to 1.0.0-beta.6 Do the the following:
cd c:\path\to\index.js npm uninstall -g node-windows npm install -g node-windows@1.0.0-beta.6 npm link node-windows
Then review your package.json file to ensure the correct node-windows version is listed in the dependencies section.
this has worked for me. thank you
Hi folks.
I solved the problem changing (fixing) the path to the node-windows folder in the nnn.XML file in the bin/daemon folder.
My problem was due to join the server to the Windows Active Directory; after this action the path to the user profile is different and need to be fixed in the nnn.XML file.
I hope this help someone like me.
After going through the code, I decided to implement yargs in order to unblock folks. This has been released as 1.0.0-beta.8. Further comments in discussion https://github.com/coreybutler/node-windows/discussions/309.
@coreybutler thanks for the fix in beta.8. It works for me by running this commands:
npm uninstall -g node-windows npm install -g node-windows npm link node-windows
Hi, I could install my service, but I can´t start it
This is my error detail.
Error: Cannot find module '@author.io/args' Require stack: