如何在暂停pkg中设置NodeJs Apps?通过Visual Studio,我没有问题,但是如果我将应用程序打包成pkg
npm i -g pkg
它立即启动和关闭。
然后,当我尝试编译时:
"pkg index.js --output test.exe --targets=node10-win-x64"
我收到错误:
Warning Cannot include addon %1 into executable.
我该如何解决这两个问题?
当我尝试通过。\ test启动我的应用程序(我试图使用robotjs)时,它会显示错误:
testRobotJS\node_modules\robotjs\build\Release\robotjs.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 67. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).