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

can't work at windows server 2003 #14

Open
xionglun opened this issue May 12, 2013 · 20 comments
Open

can't work at windows server 2003 #14

xionglun opened this issue May 12, 2013 · 20 comments

Comments

@xionglun
Copy link

I test this at windows 7 64bit, and it works well. But at windows server 2003, the cmd window stay on winser -i .

@mbarchein
Copy link

Same on Windows XP SP3. Stuck on winser -i

@jfromaniello
Copy link
Owner

Would you mind to debug it or just put a bunch of console.log to see what's
going on
El 29/06/2013 20:18, "mbarchein" [email protected] escribió:

Same on Windows XP SP3. Stuck on winser -i


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-20239042
.

@neoqing
Copy link

neoqing commented Aug 6, 2013

On window7, I cannot run it successfully. log shows below

c:\mycode\node_modules\winser\bin\winser:62
program.confirm(message, function(ok){
^
TypeError: Object # has no method 'confirm'
at sequence.then.then.then.npmPath (c:\mycode\node_modules\winser\bin\winser:62:21)
at next (c:\mycode\node_modules\winser\node_modules\sequence\sequence.js:33:20)
at Sequence.then (c:mycode\node_modules\winser\node_modules\sequence\sequence.js:49:14)
at Object. (c:mycode\node_modules\winser\bin\winser:56:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
npm ERR! [email protected] postinstall: winser -i -s -c
npm ERR! cmd "/c" "winser -i -s -c" failed with 8
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the myservice package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! winser -i -s -c
npm ERR! You can get their info via:
npm ERR! npm owner ls myservice
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "run-script" "postinstall"
npm ERR! cwd c:\mycode
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\mycode\npm-debug.log
npm ERR! not ok code 0

@jfromaniello
Copy link
Owner

Seems TJ removed prompt in last version and I am being too permissive with
the version :

https://github.com/visionmedia/commander.js/blob/master/index.js

I will fix this quickly
El 06/08/2013 05:24, "neoqing" [email protected] escribió:

On window7, I cannot run it successfully. log shows below

c:\mycode\node_modules\winser\bin\winser:62
program.confirm(message, function(ok){
^
TypeError: Object # has no method 'confirm'
at sequence.then.then.then.npmPath
(c:\mycode\node_modules\winser\bin\winser:62:21)
at next
(c:\mycode\node_modules\winser\node_modules\sequence\sequence.js:33:20)
at Sequence.then
(c:mycode\node_modules\winser\node_modules\sequence\sequence.js:49:14)
at Object. (c:mycode\node_modules\winser\bin\winser:56:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
npm ERR! [email protected] postinstall: winser -i -s -c
npm ERR! cmd "/c" "winser -i -s -c" failed with 8
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the myservice package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! winser -i -s -c
npm ERR! You can get their info via:
npm ERR! npm owner ls myservice
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program
Files\nodejs\node_modules\npm\bin\npm-cli.js" "run-script" "postinstall"
npm ERR! cwd c:\mycode
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\mycode\npm-debug.log
npm ERR! not ok code 0


Reply to this email directly or view it on GitHubhttps://github.com//issues/14#issuecomment-22164359
.

@jfromaniello
Copy link
Owner

hi @neoqing this is fixed in version 0.1.4. You can uninstall and reinstall winser

@jfromaniello
Copy link
Owner

@xionglun @neoqing could you provide more information? maybe console output

@xionglun
Copy link
Author

xionglun commented Aug 6, 2013

@jfromaniello I am so sorry, it's my last item. I had finished it two months ago with nssm directly. But i'd like to rebuild that environment and test it again.

@xionglun
Copy link
Author

xionglun commented Aug 8, 2013

@jfromaniello I use winser 0.1.3, and cd to my project root. then type winser -i, it just stuck there without any log.
And my package.json like below:

    ....
    "script": {
       "start": "node app.js",
       "install-window-service": "winser -i",
       "uninstall-windows-service": "winser -r"
   }
   ....

My os is windows server 2003 EE sp2
Do you need more infos?

@jfromaniello
Copy link
Owner

@xionglun do you run on an elevated prompt?

@xionglun
Copy link
Author

xionglun commented Aug 8, 2013

@jfromaniello yeah, I have tried using administrator privileges, but still stuck on there.

@jfromaniello
Copy link
Owner

@xionglun does this works on your system (in an elevated prompt)?

wmic OS get OSArchitecture

and whats the response

@xionglun
Copy link
Author

xionglun commented Aug 9, 2013

@jfromaniello no, it can't

    Node - MICROSOF-9E5FDA
    ERROR:
    Code  = 0x80041017
    Description  = ????
    Facility = WMI

@jfromaniello
Copy link
Owner

@xionglun i did a fix for the case where wmi is not supported, can you try version winser 0.1.5?

@xionglun
Copy link
Author

xionglun commented Aug 9, 2013

@jfromaniello I update my winser to 0.1.5 , but still stuck on there without any log.

@neoqing
Copy link

neoqing commented Sep 17, 2013

@jfromaniello ,thanks for reply. Update as below
if run with
...
"scripts": {
"postinstall": "winser -i -s -c",
"preuninstall": "winser -r -x -s"
}
...

get

winser -i -s -c

c:\mycode\node_modules\winser\bin\winser:62
program.confirm(message, function(ok){
^
TypeError: Object # has no method 'confirm'
at sequence.then.then.then.npmPath (c:\mycode\node_modules\winser\bin\winser:62:21)
at next (c:\mycode\node_modules\winser\node_modules\sequence\sequence.js:33:20)
at Sequence.then (c:\mycode\node_modules\winser\node_modules\sequence\sequence.js:49:14)
at Object. (c:\mycode\node_modules\winser\bin\winser:56:6)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
npm ERR! [email protected] postinstall: winser -i -s -c
npm ERR! cmd "/c" "winser -i -s -c" failed with 8
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is most likely a problem with the websocketclient package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! winser -i -s -c
npm ERR! You can get their info via:
npm ERR! npm owner ls websocketclient
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! cwd c:\mycode
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\mycode\npm-debug.log
npm ERR! not ok code 0

if run npm install winser directly

get below error

npm http GET https://registry.npmjs.org/winser
npm http 200 https://registry.npmjs.org/winser
npm http GET https://registry.npmjs.org/winser/-/winser-0.1.6.tgz
npm http 200 https://registry.npmjs.org/winser/-/winser-0.1.6.tgz
npm ERR! error rolling back Error: ENOTEMPTY, rmdir 'c:\mycode\node_modules\winser\bin'
npm ERR! error rolling back [email protected] { [Error: ENOTEMPTY, rmdir 'c:\mycode\node_modules\winser\bin']
npm ERR! error rolling back errno: 53,
npm ERR! error rolling back code: 'ENOTEMPTY',
npm ERR! error rolling back path: 'c:\mycode\node_modules\winser\bin' }
npm ERR! Error: ENOTEMPTY, rmdir 'c:\mycode\node_modules\winser\bin'
npm ERR! If you need help, you may report this log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! [email protected]

npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install" "winser"
npm ERR! cwd c:\mycode
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.2.18
npm ERR! path c:\mycode\node_modules\winser\bin
npm ERR! code ENOTEMPTY
npm ERR! errno 53
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! c:\mycode\npm-debug.log
npm ERR! not ok code 0

@jfromaniello
Copy link
Owner

@neoqing I fixed the program.confirm issue a month ago the first time you told me.

You should update to 0.1.6.

regards

@Aparvi
Copy link

Aparvi commented Oct 21, 2013

I'm also facing the same issue with 0.1.6 (winser version) on Windows 2003 as the command "wmic OS get OSArchitecture" does not return the control back to nodejs. So I made workaround fix to include the timeout (2 sec) as below and it looks ok as of now:

exec('wmic OS get OSArchitecture', {'timeout' : 2000}, function(err, stdout, stderr) {
if (err || !stdout) {
console.log('couldn't determine the OSArchitecture with "wmic OS get OSArchitecture". Using 32 bit version.');
return next(err, npmLocation, '32');
}
var architecture = stdout.match(/(32|64)/)[1];
next(err, npmLocation, architecture);
});

Please let me know if this is already solved...

@jfromaniello
Copy link
Owner

no, this is the first time I heard that wmic OS get OSArchitecture doesn't return. What happens if you run on a cmd?

@Aparvi
Copy link

Aparvi commented Oct 21, 2013

On the cmd, I get the below:

Node - W2K3VM32
ERROR:
Code = 0x80041017
Description = Invalid query
Facility = WMI

@Aparvi
Copy link

Aparvi commented Oct 23, 2013

Hi,
Meanwhile I have tried using %PROCESSOR_ARCHITECTURE% and it is working on all the windows platforms. I have also verified on a machine which is having a 64 bit processor and a 32 bit Windows 2008 OS and the results are as below. So I think we can use "echo %PROCESSOR_ARCHITECTURE%" in place of "wmic OS get OSArchitecture". Please suggest.

echo %PROCESSOR_ARCHITECTURE%
x86

wmic cpu get caption
Caption
x64 Family 16 Model 9 Stepping 1
x64 Family 16 Model 9 Stepping 1

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