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

Build error on Windows 11 #137

Open
khui0 opened this issue Nov 11, 2023 · 2 comments
Open

Build error on Windows 11 #137

khui0 opened this issue Nov 11, 2023 · 2 comments

Comments

@khui0
Copy link

khui0 commented Nov 11, 2023

Attempting to install npm i node-dht-sensor on Windows results in a build error. It works fine on my Raspberry Pi, same Node version.

Windows 11 Pro 23H2 Build 22631.2506

npm ERR! code 1
npm ERR! path C:\Users\kenny\Desktop\dht11web\node_modules\node-dht-sensor
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp build
npm ERR! nothing.c
npm ERR!   win_delay_load_hook.cc
npm ERR!   nothing.vcxproj -> C:\Users\kenny\Desktop\dht11web\node_modules\node-dht-sensor\build\Release\\nothing.lib
npm ERR!   bcm2835.c
npm ERR! C:\Users\kenny\Desktop\dht11web\node_modules\node-dht-sensor\src\bcm2835\bcm2835.c(16,10): fatal  error C1083: Cannot open include file: 'sys/mman.h': No such file or directory [C:\Users\kenny\Desktop\dht11web\node_modules\node-dht-sensor\build\node_dht_sensor.vcxproj]
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args   'build/binding.sln',
npm ERR! gyp info spawn args   '/clp:Verbosity=minimal',
npm ERR! gyp info spawn args   '/nologo',
npm ERR! gyp info spawn args   '/p:Configuration=Release;Platform=x64'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe` failed with exit code: 1
npm ERR! gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:203:23)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:514:28)
npm ERR! gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
npm ERR! gyp ERR! System Windows_NT 10.0.22631
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
npm ERR! gyp ERR! cwd C:\Users\kenny\Desktop\dht11web\node_modules\node-dht-sensor
npm ERR! gyp ERR! node -v v20.9.0
npm ERR! gyp ERR! node-gyp -v v9.4.0
npm ERR! gyp ERR! not ok
@khui0
Copy link
Author

khui0 commented Nov 12, 2023

I don't think this package can run on Windows? Is there a way to test it on Windows?

@JulianWowra
Copy link

+1

Cannot open include file: 'sys/mman.h': No such file or directory

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

No branches or pull requests

2 participants