NodeRT:找不到程序集

Mar*_*n D 6 node.js windows-runtime windows-10 electron

我正在编写一个带有电子窗口通知电子应用程序,该应用程序依赖于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 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\tw-en-t y\node_modules\@nodert-win10\windows.ui.startscreen\build\binding.vcxproj]
..\CollectionsConverterUtils.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\pr ojects\tw-en-ty\node_modules\@nodert-win10\windows.ui.startscreen\build\binding.vcxproj]
  win_delay_load_hook.cc
..\OpaqueWrapper.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\tw-en -ty\node_modules\@nodert-win10\windows.ui.startscreen\build\binding.vcxproj]
C:\Applications\nodejs\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.cc : fatal error C1107: could not find assembly 'Windows.winmd': please specify the assembly search path using /AI or by se tting the LIBPATH environment variable [C:\Users\moro\projects\tw-en-ty\node_modules\@nodert-win10\windows.ui.startscreen\build\binding.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Applications\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:276:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 10.0.14393
gyp ERR! command "C:\\Applications\\nodejs\\node.exe" "C:\\Applications\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--msvs_version=2015"
gyp ERR! cwd C:\Users\moro\projects\tw-en-ty\node_modules\@nodert-win10\windows.ui.startscreen
gyp ERR! node -v v6.9.5
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
Run Code Online (Sandbox Code Playgroud)

拜托,你能帮我吗?

这里也有人问这个问题:https : //github.com/NodeRT/NodeRT/issues/56

Abh*_*tap 12

我也收到以下错误:

d:\nodejs\app\node_modules\npm\node_modules\node-gyp\src\win_delay_load_hook.cc : fatal error C1107: could not find assembly 'Windows.winmd': please specify the assemb
ly search path using /AI or by setting the LIBPATH environment variable [D:\nodejs\work\app\node_modules\@nodert-win10-cu\windows.applicationmodel\b
uild\binding.vcxproj]
d:\nodejs\work\app\node_modules\@nodert-win10-cu\windows.applicationmodel\opaquewrapper.cpp : fatal error C1107: could not find assembly 'Windows.wi
nmd': please specify the assembly search path using /AI or by setting the LIBPATH environment variable [D:\nodejs\work\app\node_modules\@nodert-win1
0-cu\windows.applicationmodel\build\binding.vcxproj]
d:\nodejs\work\app\node_modules\@nodert-win10-cu\windows.applicationmodel\nodertutils.cpp : fatal error C1107: could not find assembly 'Windows.winm
d': please specify the assembly search path using /AI or by setting the LIBPATH environment variable [D:\nodejs\work\app\node_modules\@nodert-win10-
cu\windows.applicationmodel\build\binding.vcxproj]
d:\nodejs\work\app\node_modules\@nodert-win10-cu\windows.applicationmodel\_nodert_generated.cpp : fatal error C1107: could not find assembly 'Window
s.winmd': please specify the assembly search path using /AI or by setting the LIBPATH environment variable [D:\nodejs\work\app\node_modules\@nodert-
win10-cu\windows.applicationmodel\build\binding.vcxproj]
d:\nodejs\work\app\node_modules\@nodert-win10-cu\windows.applicationmodel\collectionsconverterutils.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 [D:\nodejs\work\app\node_modules\
@nodert-win10-cu\windows.applicationmodel\build\binding.vcxproj]
Run Code Online (Sandbox Code Playgroud)

我按照以下步骤操作:

  1. 创建一个文件夹(检查 building.gyp 文件的路径)

    %ProgramFiles(x86)%/Microsoft Visual Studio 14.0/VC/lib/store/references

  2. platform.winmd从复制文件

    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\lib\x86\store\references

  3. Windows.winmd从复制文件

    C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.17763.0

帮我解决了“platform.winmd”、“Windows.winmd”错误!


FFF*_*FFF 5

对于处理此问题的其他任何人。我通过复制 Windows.winmd 修复了它

C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.16299.0

C:\Program Files (x86)\Windows Kits\10\UnionMetadata


Mar*_*n D 3

在另一台计算机上尝试完整安装过程后,我发现导致此问题的问题。安装说明中指出需要“VS 2015 Express for Windows Desktop” 。然而,Visual Studio 本身还不够,安装时还必须安装Windows 10 SDK

回想起来,这似乎是显而易见的,但对于刚接触 JS 原生相关技术的人来说,在 README 中显式声明这一点可能会很有用。:)