Node.js 使用electron运行escpos模块
我正在从事electron项目,在尝试使用“escpos”模块时遇到问题,它向我显示了以下错误:Node.js 使用electron运行escpos模块,node.js,electron,node-modules,escpos,Node.js,Electron,Node Modules,Escpos,我正在从事electron项目,在尝试使用“escpos”模块时遇到问题,它向我显示了以下错误: Uncaught Error: The module '/Users/Fateh/Desktop/electron-test/node_modules/@serialport/bindings/build/Release/bindings.node'`enter code here was compiled against a different Node.js version using
Uncaught Error: The module '/Users/Fateh/Desktop/electron-test/node_modules/@serialport/bindings/build/Release/bindings.node'`enter code here
was compiled against a different Node.js version using
NODE_MODULE_VERSION 67. This version of Node.js requires
NODE_MODULE_VERSION 73. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
at process.func (electron/js2c/asar.js:138)
at process.func [as dlopen] (electron/js2c/asar.js:138)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:828)
at Object.func (electron/js2c/asar.js:138)
at Object.func [as .node] (electron/js2c/asar.js:138)
at Module.load (internal/modules/cjs/loader.js:645)
at Function.Module._load (internal/modules/cjs/loader.js:560)
at Module.require (internal/modules/cjs/loader.js:685)
at require (internal/modules/cjs/helpers.js:16)
at bindings (/Users/Fateh/Desktop/electron-test/node_modules/bindings/bindings.js:112)`
知道我正在使用NodeJSV11.6.0、Electron v6.0.12和escpos V2.5.2
显然,escpos是在节点8版本下构建的,
有没有办法在节点JS11下运行它