-1

I am trying to execute some existing code in Node.js on a different system but I am getting an error which I have no clue about.

The system was unable to find the specified registry key or value

When I tried to see the full stack trace, it was:

ERROR: The system was unable to find the specified registry key or value.] 
name: [Getter], message: [Getter], code: [Getter] }
ProcessUncleanExitError: QUERY command exited with code 1:

ERROR: The system was unable to find the specified registry key or value.
at mkErrorMsg 
(C:\Bhuwan\UFD2_0\API\node_modules\winreg\lib\registry.js:111:12)
at ChildProcess.<anonymous> (C:\Bhuwan\UFD2_0\API\node_modules\winreg\lib\registry.js:459:10)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:821:16)
at Socket.<anonymous> (internal/child_process.js:319:11)
at emitOne (events.js:77:13)
at Socket.emit (events.js:169:7)
at Pipe._onclose (net.js:469:12)

Please note that the code is working just fine on my other system. It is some problem with the current system. Can anyone help me regarding this?

Also, I am using Node v4.3.2 from NVM.

Thanks in advance!

writeToBhuwan
  • 3,233
  • 11
  • 39
  • 67
  • 1
    Can you provide more info on: what registry key your application is looking for? and which is the value for that key on your current system, and more importantly when and why your application store data there? – Igor Milla Jul 13 '17 at 11:17
  • Can we have a portion of your code ? At least the part that throws the error ? – ClementNerma Jul 13 '17 at 16:12
  • 1
    Judging from the error message, the issue seems to be that a certain registry key is not there. Look up what the missing key is and create it on the new system. Also follow the good pieces of advice you got in the other comments. – simlev Jul 19 '17 at 13:54
  • I think the error is that in `registry.js` located at "C:\Bhuwan\UFD2_0\API\node_modules\winreg\lib\", the system was unable to find the specified registry key or value. Without source code, not much else to say. – Fabien Jul 20 '17 at 00:04
  • Just to be sure: you didn't copy the project folder over from the working system but instead copied the sources and ran npm install? Otherwise there might be stuff missing. – Rob Jul 20 '17 at 09:10

1 Answers1

1

The code is trying to find a registry key telling the Winreg package to find a registry key but can't because it isn't there. But it does exist on the machine that succeeds to run the code. You have to copy the key from the machine that can run the code to the other machine that the code can't run on. For us to give an answer, you need to show us the piece of your code that the error is happening in. find the line that tells the Winreg package to find a certain key. Then your problem can be solved.

ooransoy
  • 785
  • 5
  • 10
  • 25