【问题标题】:Why do Node.JS packages have to be compiled with Electron to be able to use them in VSCode extension development?为什么 Node.JS 包必须用 Electron 编译才能在 VSCode 扩展开发中使用它们?
【发布时间】:2019-10-17 13:59:28
【问题描述】:

我们有一个使用 node 的 VSCode 扩展,但是当我直接导入它时,它不起作用,因为它必须使用 Electron 框架进行编译。 当我用 Electron 编译模块时,我没有任何问题。

有什么区别? Electron 框架有什么作用?

谢谢, 阿基尔

【问题讨论】:

    标签: visual-studio-code vscode-extensions


    【解决方案1】:

    Electron 发布了它的 own, custom version of node,VS Code 使用它来运行扩展。在执行 JavaScript 时,Electron 的节点版本和您的节点安装之间的差异并不重要,但本机节点模块 must be recompiled 以确保它们是为特定版本的节点电子使用而构建的。

    document on ABI stability in node 涵盖了首先需要为不同节点版本重新编译的一些原因

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-03-04
      • 2017-10-18
      • 2017-12-16
      • 1970-01-01
      • 2012-04-05
      • 2011-04-21
      • 2016-12-14
      相关资源
      最近更新 更多