lmdb-js
lmdb-js copied to clipboard
Build fails on Windows MINGW64 under [email protected]
Originally posted here: parcel-bundler/parcel#7992, and looks like it may be an upstream issue here in lmdb:
$ volta install node@18
$ npm install parcel
npm ERR! code 1
npm ERR! path C:\Users\ec\Desktop\testing_parcel\node_modules\lmdb
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c node-gyp-build
npm ERR! Building the projects in this solution one at a time. To
enable parallel build, please add the "-m" switch.
npm ERR! lmdb-js.cpp
npm ERR! C:\Users\ec\AppData\Local\node-gyp\Cache\18.0.0\include\node\cppgc\common.h(9,10):
fatal error C1083: Cannot open include file: 'v8config.h':
No such file or directory [C:\Users\ec\Desktop\testing_parcel\node_modules\lmdb\build\lmdb.vcxproj]
...
Installs fine under [email protected]. (=
This project has already been upgraded to support Node@18 with prebuilds for V18, which hopefully should apply in MinGW, just working on upgrading parcel to use the latest version. In the meantime, if you want to manually force it, I think you could try using a package override with something like:
"overrides": { "[email protected]": { "lmdb": "2.3.5" }}
I will take a look at why manual compiles are not working on MinGW though.
I wasn't able to reproduce any issues with manually building lmdb-js through the MinGW terminal on my computer. But windows builds can be a fickle beast (kinda one of the main reasons we provide prebuilds). Do you have the output with --verbose in case that has more clues? (not clear why it wouldn't be able to open C:\Users\ec\AppData\Local\node-gyp\Cache\18.0.0\include\node\v8config.h, I assume it got downloaded.)
(of course once the parcel/lmdb upgrade is in place you should just have prebuilt binaries to use)
Unfortunately, I'm not actively a parcel user — only ran into this while I was going through a "learn React" tutorial.
If you can't reproduce, and suspect this will be fixed in an upcoming release, feel free to just close this — if you are suspicious it's a real issue, and can provide me specific commands I can run on the machine that produced the original error, I can attempt them … but I have very limited time to contribute, unfortunately!
I know, the worst kind of drive-by Issue reporting. I'm so sorry, heh.
No problem, updated windows prebuilds, once they are released, should fix this for virtually all windows users, I believe :).