protomaps / PMTiles

Cloud-optimized + compressed single-file tile archives for vector and raster maps

Home Page:https://protomaps.com/docs/pmtiles/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency error creating Cloudflare Worker

markconnellypro opened this issue · comments

Hello,

I am working through step 2 of the Cloudflare CDN instructions (https://protomaps.com/docs/cdn/cloudflare), using the alternate Wrangler procedure, and encountered what appears to be a dependency issue. I've tried this using NodeJS versions 16, 18, and 20. Any suggestions? The text of the error follows. Thank you.


✘ [ERROR] Could not resolve "fflate"

../../js/index.ts:1:31:
  1 │ import { decompressSync } from "fflate";
    ╵                                ~~~~~~~~

You can mark the path "fflate" as external to exclude it from the bundle, which will remove this error.

✘ [ERROR] Could not resolve "fflate"

../../js/v2.ts:9:31:
  9 │ import { decompressSync } from "fflate";
    ╵                                ~~~~~~~~

You can mark the path "fflate" as external to exclude it from the bundle, which will remove this error.

✘ [ERROR] Build failed with 2 errors:

../../js/index.ts:1:31: ERROR: Could not resolve "fflate"
../../js/v2.ts:9:31: ERROR: Could not resolve "fflate"

you need to cd js from the root and npm install - need to fix the docs here if it doesn't include that

My apologies -- my mistake. Thank you!