Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix windows compatibility of memwatch.cc #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

curvedriver
Copy link

Fixes windows compatibility of memwatch.cc which is broken since #3 .
I used uv_hrtime() instead of gettimeofday to get gc_ts in microseconds.

npm install of v1.0.2 and v.2.0.0 shows the following error on a windows machine:

C:\work\myproject\node_modules\@airbnb\node-memwatch\src\memwatch.cc(19): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory [C:\work\myproject\node_modules\@airbnb\node-memwatch\build\memwatch.vcxproj]
gyp ERR! build error 
gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:191:23)
gyp ERR! stack     at ChildProcess.emit (events.js:198:13)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.19041
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\work\myproject\node_modules\@airbnb\node-memwatch
gyp ERR! node -v v10.22.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})    

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @airbnb/[email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @airbnb/[email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant