很简单。我在 Windows 8 上,我使用 asar 模块打包了一个包含节点应用程序的文件夹。
我跑了node app.asar,得到了错误
SyntaxError: Unexpected token ILLEGAL at exports.runInThisContext (vm.js:53:16) "(function (exports, require, module, __filename, __dirname) { ?"
在哪里 ?显然是一个无效字符。
如果我可以在打包之前毫无问题地运行该应用程序,并且 asar 存档文件对于 nodejs 进程来说是可读的,那么为什么此存档文件包含无效字符