title: Using RFID Reader on Node JS
body: <p>I'm working for a public library in my town, and I have developed a web application to handle the borrowing process and other administration problem. A few years ago, the library bought and attached the books in the library with a RFID tag, and with it, also bought a RFID Reader to be used in the borrowing process, and a RFID Sensor Security Gate, to prevent the books from being taken out without proper administration process. For the RFID Reader to be used, the vendor gave me a JAVA applet to connect the RFID Reader to my web application, as it's not possible to access a device from  the web with just Javascript or JQuery.</p>
  
  <p>Currently, the library is asking me to develop a <strong>kiosk application</strong> for the library's self service center. I currently developing the kiosk application with <strong>Node JS</strong>, and I managed to create the user and password authentication with native Javascript and AJAX function.</p>
  
  <p><a href="https://i.stack.imgur.com/kPAdN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kPAdN.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/aM6jc.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aM6jc.jpg" alt="User ID authentication"></a>
  <a href="https://i.stack.imgur.com/XCzgG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XCzgG.jpg" alt="Password authentication"></a>
  <a href="https://i.stack.imgur.com/fGjWi.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fGjWi.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/T7QGQ.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T7QGQ.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/fEnj6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fEnj6.jpg" alt="enter image description here"></a></p>
  
  <p>However, problem occured when I tried to use the RFID Reader to detect the books. I tried using some modules called <strong>node-hid</strong>, but everytime I run the application, it gave me an error message.</p>
  
  <p><a href="https://i.stack.imgur.com/slca6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/slca6.jpg" alt="enter image description here"></a></p>
  
  <p>I used:</p>
  
  <ul>
  <li>Windows 10</li>
  <li>Node v10.16.3</li>
  <li>npm v6.9.2</li>
  <li>Electron v5.0.6</li>
  </ul>
  
  <p>Some poeple in the forums recommended to rebuild and reinstall the module and the node, but it's not working for me. Others told me to downgraded the Node or the npm using nvm, but from what i read, nvm only worked for Linux. Honestly, I'm still new in Node JS, and I'm a little bit confused: regarding the error message above, which one is actually the problem? The Node version, or the npm version?</p>
  
  <p>Struggling, I tried to forget about using modules about RFID, and start from the scratch by detecting devices connected on USB first, so I use <strong>serialport</strong> module, but the same error persist.</p>
  
  <p>I expected to be able to read the books' ID from the RFID tag, and rewrite some blocks in it to prevent the alarms from the RFID Sensor Security Gate goes off.</p>
  
  <p>Any supports regarding the error above, or a recommendations to use another module will be appreciated. I'm at the end of my rope here.</p>