coreybutler / node-windows

Windows support for Node.JS scripts (daemons, eventlog, UAC, etc).
Other
2.8k stars 356 forks source link

Cannot use Promise.defer #167

Closed szlaskidaniel closed 7 years ago

szlaskidaniel commented 7 years ago

node app.js works brilliant. When the same app.js is wrapped by node-windows - I've got errors that "Promise.defer is not a function"

coreybutler commented 7 years ago

https://github.com/coreybutler/node-windows/wiki#my-script-runs-fine-on-its-own-but-not-with-node-windows-why

szlaskidaniel commented 7 years ago

Hi, thx for link, but I do not believe that it's __dirname issue. Script launched properly, the error is related to the word "Promise.defer();" return new Promise works fine, but it do not work with older one, which is Promise.defer();

coreybutler commented 7 years ago

A wrapper like node-windows won't cause a problem with native JS (which promises are). I'm confident this is an application issue, not a node-windows issue, so I'm going to close this. I'd suggest posting on StackOverflow with more detail about your specific case.... it's hard to even guess at what the problem is when we can't see any code. Once you've done this, feel free to put the link in here and I'll look at it as time allows.