fresc81 / node-winreg

node module that provides access to the Windows Registry through the REG commandline tool
211 stars 60 forks source link

Problem with 'pkg' #48

Open U-siro opened 6 years ago

U-siro commented 6 years ago

It works with "node launcher". However if I use "pkg" to compile this node program and run it, Then..

{ ProcessUncleanExitError: QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value. at mkErrorMsg (D:\snapshot\Maple\node_modules\winreg\lib\registry.js:111:12) at ChildProcess. (D:\snapshot\Maple\node_modules\winreg\lib\registry.js:632:10) at ChildProcess.emit (events.js:159:13) at maybeClose (internal/child_process.js:943:16) at Socket.stream.socket.on (internal/child_process.js:363:11) at Socket.emit (events.js:159:13) at Pipe._handle.close [as _onclose] (net.js:558:12) name: [Getter], message: [Getter], code: [Getter] } TypeError: Cannot read property 'value' of null at D:\snapshot\Maple\launcher.js:0:0 at ChildProcess. (D:\snapshot\Maple\node_modules\winreg\lib\registry.js:632:7) at ChildProcess.emit (events.js:159:13) at maybeClose (internal/child_process.js:943:16) at Socket.stream.socket.on (internal/child_process.js:363:11) at Socket.emit (events.js:159:13) at Pipe._handle.close [as _onclose] (net.js:558:12)

Please check it, Thanks!

jbmonroe commented 6 years ago

It looks like the string formatting function is either not there or errant--but it runs in VSCode, just not outside it. Why isn't this using ES6 string formatting and then run through Babel or Buble to demote it to ES5?