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

Node 22 windows issue #3148

Closed
acalcutt opened this issue Jan 16, 2025 · 2 comments
Closed

Node 22 windows issue #3148

acalcutt opened this issue Jan 16, 2025 · 2 comments

Comments

@acalcutt
Copy link
Collaborator

acalcutt commented Jan 16, 2025

MAUI is somehow related to my work, except I used C++/CLI. But it's a opportunity to take a look and see if there's something useful to your project.

Sorry to hijack this, but @tdcosta100 is there a chance that the mbgl.node binary for windows (since atleast maplibre-gl-native v5.4.0+ with Node v22) doesn't link all necessary DLLs?

In particular these 2: msvcp140.dll and msvcp140_codecvt_ids.dll

Everything works fine on my dev machine (where C/C++ build tools are installed). However, I've tried using the mbgl.node binary in the Windows Sandbox, and after some testing I found out that the before mentioned DLL's seem to be missing. Is it a prerequisite to have the build tools installed only for building or also for using the binary?

Originally posted by @etnav in #3146

@etnav , make sure you have the latest c++ redistributable from https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170 , I believe there was a update to the vcpkg in those versions of the maplibre-native node package that required a c++ redistibutable update. Without it, the node process kind of ends silently

I know we had that issue in maplibre-native node v6, but i think we also updated vcpkg in the later version of v5 also. I noted this on tileserver-gl v5.0.0 release, which uses maplibre-native v6.0.0, because it didn't really say much when it failed.

Edit: it looks like I noted that for this tileserver-gl v4.13.0 release also, which used maplibre-native v5.4.1
https://github.com/maptiler/tileserver-gl/releases/tag/v4.13.0

@etnav
Copy link
Contributor

etnav commented Jan 17, 2025

Thanks for creating the issue.

As mentioned, I tested this in the Windows Sandbox. My application ships most of the (vcredist) DLL's for other parts that depend on them so I've had them partially covered except for msvcp140_codecvt_ids.dll and (apparently an older version) msvcp140.dll

Whilst msvcp140_codecvt_ids.dll is missing, I'd get the error where the mbgl.node can't be found within node_modules/@maplibre/maplibre-gl-native/lib/node-v127/ directory, even though it's clearly present. Adding this DLL then resulted in the behaviour you also desribed: node process just ends silently.

I then installed all the DLL's and it started working immedately. However I wanted to know what exactly was missing. Turns out that the msvcp140.dll that I ship for some other stuff is maybe an older version, because when I include the new one it works like a charm.

@acalcutt
Copy link
Collaborator Author

I noticed the same thing when I was having issues. it was acting like dlls were missing, wich usually come from the redistributable. after upgrading the redoubtable it worked.

Sounds like you got it working so I will close this

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