安装 gpu.js 后运行电子应用程序时出错

问题描述

我已经构建了一个电子应用程序。安装 gpu.js 库“npm install gpu.js --save”后。 当我尝试运行电子应用程序时,它出错了。 该应用程序是使用电子伪造库编译和运行的。

我为某些信号处理功能构建了一个电子应用程序。它从设备接收一些数据,然后对其进行处理并显示图表。

我已经使用 node-addon-api 实现了数据接收部分。我正在将接收到的数据从设备发送到 js,并希望使用 gpujs 库在 js 中实现信号处理。

安装 gpujs 库后,当我尝试运行应用程序时。我收到此错误。 我试图寻找解决方案,但没有任何效果

\ Preparing native dependencies: 0 / 1webgl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::backingStore> __cdecl v8::ArrayBuffer::GetBacki
     ngStore(void)" (__imp_?GetbackingStore@ArrayBuffer@v8@@QEAA?AV?$shared_ptr@VbackingStore@v8@@@std@@XZ) referenced in function "public: __cdecl Nan::TypedArrayConten
     ts<char>::TypedArrayContents<char>(class v8::Local<class v8::Value>)" (??0?$TypedArrayContents@D@Nan@@QEAA@V?$Local@VValue@v8@@@v8@@@Z) [E:\Projects\Software_Define 
      d_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\Release\webgl.node : Fatal error LNK1120: 1 unresolved externals [E:\Projects\Software_Defined_Radio\ 
     BoxRF\node_modules\gl\build\webgl.vcxproj]
     × Preparing native dependencies: 0 / 1

An unhandled error has occurred inside Forge:
node-gyp Failed to rebuild 'E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl'.
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` Failed with exit code: 1


Error: node-gyp Failed to rebuild 'E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl'.
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` Failed with exit code: 1


at ModuleRebuilder.rebuildNodeGypModule (E:\Projects\Software_Defined_Radio\BoxRF\node_modules\electron-rebuild\src\module-rebuilder.ts:231:13)
at processticksAndRejections (internal/process/task_queues.js:93:5)
at Rebuilder.rebuildModuleAt (E:\Projects\Software_Defined_Radio\BoxRF\node_modules\electron-rebuild\src\rebuild.ts:283:5)
at Rebuilder.rebuild (E:\Projects\Software_Defined_Radio\BoxRF\node_modules\electron-rebuild\src\rebuild.ts:189:9)
at E:\Projects\Software_Defined_Radio\BoxRF\node_modules\@electron-forge\core\src\util\rebuild.ts:33:5

下面我还添加了整个日志仅供参考:

electron-forge start
√ Checking your system
√ Locating Application
Preparing native dependencies: 0 / 1Building the projects in this solution one at a time. To enable parallel build,please add the "-m" switch.
/ Preparing native dependencies: 0 / 1  copying E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl/deps/windows/dll/x64/libEGL.dll to E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build
\Release
Preparing native dependencies: 0 / 1          1 file(s) copied.
copying E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl/deps/windows/dll/x64/libGLESv2.dll to E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\Release
     1 file(s) copied.
copying E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl/deps/windows/dll/x64/d3dcompiler_47.dll to E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\Release
      1 file(s) copied.
\ Preparing native dependencies: 0 / 1  bindings.cc
/ Preparing native dependencies: 0 / 1E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\11.1.0\include\node\v8.h(9182,39): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version.
 [E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\11.1.0\include\node\v8.h(9190,42): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. 
 [E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
Preparing native dependencies: 0 / 1  webgl.cc
| Preparing native dependencies: 0 / 1E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\11.1.0\include\node\v8.h(9182,39): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version.
[E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\11.1.0\include\node\v8.h(9190,42): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. 
 [E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
\ Preparing native dependencies: 0 / 1E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\src\native\webgl.cc(466,37): warning C4312: 'reinterpret_cast': conversion from 'GLint' to 'GLvoid *' of gr
     eater size [E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
Preparing native dependencies: 0 / 1  procs.cc
Preparing native dependencies: 0 / 1E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\11.1.0\include\node\v8.h(9182,42): warning C4996: 'v8::MicrotasksCompletedCallback': Use *WithData version. 
[E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
| Preparing native dependencies: 0 / 1  win_delay_load_hook.cc
Preparing native dependencies: 0 / 1     Creating library        
E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\Release\webgl.lib and object
E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\Release\webgl.exp
\ Preparing native dependencies: 0 / 1webgl.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class std::shared_ptr<class v8::backingStore> __cdecl v8::ArrayBuffer::GetBacki
ngStore(void)" (__imp_?GetbackingStore@ArrayBuffer@v8@@QEAA?AV?$shared_ptr@VbackingStore@v8@@@std@@XZ) referenced in function "public: __cdecl Nan::TypedArrayConten
     ts<char>::TypedArrayContents<char>(class v8::Local<class v8::Value>)" (??0?$TypedArrayContents@D@Nan@@QEAA@V?$Local@VValue@v8@@@v8@@@Z) [E:\Projects\Software_Define 
     d_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\Release\webgl.node : Fatal error LNK1120: 1 unresolved externals [E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl\build\webgl.vcxproj]
× Preparing native dependencies: 0 / 1

An unhandled error has occurred inside Forge:
node-gyp Failed to rebuild 'E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl'.
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` Failed with exit code: 1


Error: node-gyp Failed to rebuild 'E:\Projects\Software_Defined_Radio\BoxRF\node_modules\gl'.
Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` Failed with exit code: 1


at ModuleRebuilder.rebuildNodeGypModule (E:\Projects\Software_Defined_Radio\BoxRF\node_modules\electron-rebuild\src\module-rebuilder.ts:231:13)
at processticksAndRejections (internal/process/task_queues.js:93:5)
at Rebuilder.rebuildModuleAt (E:\Projects\Software_Defined_Radio\BoxRF\node_modules\electron-rebuild\src\rebuild.ts:283:5)
at Rebuilder.rebuild (E:\Projects\Software_Defined_Radio\BoxRF\node_modules\electron-rebuild\src\rebuild.ts:189:9)
at E:\Projects\Software_Defined_Radio\BoxRF\node_modules\@electron-forge\core\src\util\rebuild.ts:33:5
 npm ERR! code ELIFECYCLE
 npm ERR! errno 1
 npm ERR! Boxrf@1.0.0 start: `electron-forge start`
 npm ERR! Exit status 1
 npm ERR!
 npm ERR! Failed at the Boxrf@1.0.0 start script.
 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

 npm ERR! A complete log of this run can be found in:
 npm ERR!     C:\Users\susha\AppData\Roaming\npm-cache\_logs\2021-05-28T03_58_03_166Z-debug.log

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)