Electron - pcsclite.node was compiled against a different Node.js version
首先我使用 pcsclite 遇到以下問題
Error: The module '.../node_modules/@pokusew/pcsclite/build/Release/pcsclite.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 51. This version of Node.js requires
NODE_MODULE_VERSION 53. Please try re-compiling or re-installing
把 Node version提升了,也沒作用
後來使用rebuild才成功
安裝模組並重新建置 Electron
npm install --save-dev electron-rebuild
# 每次執行完 "npm install" 後,記得再跑:
./node_modules/.bin/electron-rebuild
# 如果你在 Windows 下碰到問題,可以試:
.\node_modules\.bin\electron-rebuild.cmd
留言
張貼留言