【发布时间】:2018-12-12 00:57:27
【问题描述】:
我正在尝试从一个简单的 node.js example.js 应用程序创建本机图像。
当运行应用程序时:
node --native -i --native example.js
然后应用程序正在启动并按预期工作。
现在我想创建一个原生图像。我尝试了以下命令:
native-image --language:js example.js
但是由于错误,它不起作用:
Build on Server(pid: 77626, port: 64052)
[example.js:77626] classlist: 3,964.04 ms
error: Main entry point class 'example.js' not found.
Error: Processing image build request failed
作为解决方案,我在example.js 中创建了一个主入口点,例如:
function main(args) {
console.log("Main app started")
}
但是这不起作用。
有没有办法通常为 js/node.js 应用程序创建原生图像?
【问题讨论】:
标签: javascript node.js graalvm