小编Mar*_*n D的帖子

无法在NodeJS中使用本机Windows库

我正在尝试编写一个使用Windows本机通知的简单Electron应用程序.为此,我依赖于电子窗口交互式通知.

当我在我的项目上运行npm install之后,electron-rebuild我得到:

App threw an error during load
Error: The specified module could not be found.
\\?\C:\Users\moro\projects\tw-en-ty\node_modules\electron-windows-interactive-notifications\build\Release\notifications_bindings.node
    at Error (native)
    at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:173:20)
    at Object.Module._extensions..node (module.js:583:18)
    at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20)
    at Module.load (module.js:473:32)
    at tryModuleLoad (module.js:432:12)
    at Function.Module._load (module.js:424:3)
    at Module.require (module.js:483:17)
    at require (internal/module.js:20:19)
    at bindings (C:\Users\moro\projects\tw-en-ty\node_modules\bindings\bindings.js:76:44)
Run Code Online (Sandbox Code Playgroud)

根据NodeJS问题,它可能是本机依赖性问题.当我notifications_bindings.node通过dependencywalker检查时,我看到以下缺少直接的DLL(在许多缺少的嵌套中):

图片

坦率地说,我不知道问题是什么:

node.js windows-runtime node-gyp windows-10 electron

14
推荐指数
1
解决办法
961
查看次数

NodeRT:找不到程序集

我正在编写一个带有电子窗口通知电子应用程序,该应用程序依赖于NodeRT

当我尝试安装项目时,每个@nodert-win10依赖项都会出现以下错误:

> if not defined npm_config_node_gyp (node "C:\Applications\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild --msvs_version=2015 )  else (node "" rebuild --msvs_version=2015 )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  _nodert_generated.cpp
  NodeRtUtils.cpp
  OpaqueWrapper.cpp
  CollectionsConverterUtils.cpp
..\_nodert_generated.cpp : fatal error C1107: could not find assembly 'Windows.winmd': please specify the assembly search path using /AI or by setting the LIBPATH environment variable [C:\Users\moro\projects\t w-en-ty\node_modules\@nodert-win10\windows.ui.startscreen\build\binding.vcxproj]
..\NodeRtUtils.cpp : fatal error …
Run Code Online (Sandbox Code Playgroud)

node.js windows-runtime windows-10 electron

6
推荐指数
3
解决办法
2018
查看次数