lmdb-js icon indicating copy to clipboard operation
lmdb-js copied to clipboard

Build fails on Windows MINGW64 under [email protected]

Open ELLIOTTCABLE opened this issue 3 years ago • 4 comments

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]. (=

ELLIOTTCABLE avatar Apr 22 '22 04:04 ELLIOTTCABLE

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.

kriszyp avatar Apr 22 '22 12:04 kriszyp

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)

kriszyp avatar Apr 22 '22 13:04 kriszyp

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.

ELLIOTTCABLE avatar Apr 22 '22 21:04 ELLIOTTCABLE

No problem, updated windows prebuilds, once they are released, should fix this for virtually all windows users, I believe :).

kriszyp avatar Apr 22 '22 21:04 kriszyp