最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

node.js - maplibre-gl-native fails without error message on nodejs - Stack Overflow

programmeradmin3浏览0评论

I want to render static map images on my Nodejs (typescript) server using maplibre-gl-native on a Windows machine. As soon as the import mbgl from "@maplibre/maplibre-gl-native"; is present in my server.ts file, the server crashes without an error message.

  • I tried different maplibre-gl-native versions (6.0.0, 5.4.1)
  • I tried different node versions (18,20,22)
  • I tried it in a small vite-project where I only installed the maplibre-gl-native package
  • I tried it with Typescript and Javascript
  • I tried to run it both with nodemon and node
  • I tried it on Windows 11 and 10
  • I looked at two projects that use maplibre-gl-native, but couldn't find any specific methods:
  • tileserver-gl: .js#L1069
  • mbgl-renderer: .js#L715

The maplibre-gl-native readme (/@maplibre/maplibre-gl-native) says:

Binaries are available and downloaded during install for the following platforms:

    Operating systems:
        Ubuntu 22.04 (amd64/arm64)
        macOS 12 (amd64/arm64)
        Windows (amd64)
    Node.js 16, 18, 20, 22

Run: npm install @maplibre/maplibre-gl-native

It looks pretty straight forward to me, I don't think any other steps are necessary on Windows. I didn't find any similar problem descriptions, so I have no idea what else to do!?

发布评论

评论列表(0)

  1. 暂无评论