我的摩卡测试电子开发环境很小。我安装了图片缩略图库,并将其重新编译为电子版:
./node_modules/.bin/electron-rebuild
但是当我使用mocha运行测试时,出现错误:
Error: The module '/home/jose/Dev/JavaScripts/Electron/Ng6ETesting/node_modules/sharp/build/Release/sharp.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 59. Please try re-compiling or re-installing
我运行npm rebuild
,然后它适用于测试用例,但应用程序未启动。现在的错误是:
Error: The module '/home/jose/Dev/JavaScripts/Electron/Ng6ETesting/node_modules/sharp/build/Release/sharp.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 57. Please try re-compiling or re-installing
有帮助吗? 预先感谢。