0

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

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

我已经使用 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,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  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
4

0 回答 0