1

我正在尝试memwatch使用: Node v14.15.0、 npm6.14.9和 Windows 10 进行安装,但没有运气。

最近有人能安装这个吗?

我已按照node-gyp 的说明安装了 Visual Studio 2019 和“Visual C++ 构建工具”

谢谢

日志:

PS C:\Users\Shaan\dev\monitor> npm install memwatch

> memwatch@0.2.2 install C:\Users\Shaan\dev\monitor\node_modules\memwatch
> node-gyp rebuild


C:\Users\Shaan\dev\monitor\node_modules\memwatch>if not defined npm_config_node_gyp (node "C:\Users\Shaan\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\Shaan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "-m" switch.
  heapdiff.cc
  init.cc
  memwatch.cc
  util.cc
  win_delay_load_hook.cc
C:\Users\Shaan\dev\monitor\node_modules\memwatch\src\memwatch.hh(12,9): error C2039: 'Handle': is not a member of 'v8' (compiling source file ..\src\memwatch.cc) [C:\Users\Shaan\dev\monitor\node_modul
es\memwatch\build\memwatch.vcxproj]
C:\Users\Shaan\AppData\Local\node-gyp\Cache\14.15.0\include\node\v8-platform.h(16): message : see declaration of 'v8' (compiling source file ..\src\memwatch.cc) [C:\Users\Shaan\dev\monitor\node_module 
s\memwatch\build\memwatch.vcxproj]
C:\Users\Shaan\dev\monitor\node_modules\memwatch\src\memwatch.hh(12,15): error C2143: syntax error: missing ';' before '<' (compiling source file ..\src\memwatch.cc) [C:\Users\Shaan\dev\monitor\node_m 
odules\memwatch\build\memwatch.vcxproj]

...

C:\Users\Shaan\dev\monitor\node_modules\memwatch\src\memwatch.hh(10): message : see declaration of 'memwatch' [C:\Users\Shaan\dev\monitor\node_modules\memwatch\build\memwatch.vcxproj]
C:\Users\Shaan\dev\monitor\node_modules\memwatch\src\memwatch.cc(249,59): error C2143: syntax error: missing ';' before '{' [C:\Users\Shaan\dev\monitor\node_modules\memwatch\build\memwatch.vcxproj]    
C:\Users\Shaan\dev\monitor\node_modules\memwatch\src\memwatch.cc(249,59): error C2447: '{': missing function header (old-style formal list?) [C:\Users\Shaan\dev\monitor\node_modules\memwatch\build\mem 
watch.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Shaan\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Shaan\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\Shaan\dev\monitor\node_modules\memwatch
gyp ERR! node -v v14.15.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! memwatch@0.2.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the memwatch@0.2.2 install 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\Shaan\AppData\Roaming\npm-cache\_logs\2020-11-23T13_14_40_166Z-debug.log
PS C:\Users\Shaan\dev\monitor>

4

1 回答 1

0

尝试使用 node-memwatch-new@0.0.1

于 2021-11-25T06:31:39.417 回答