robertleeplummerjr / Leaflet.glify

fully functional, ridiculously fast web gl renderer plugin for leaflet
https://robertleeplummerjr.github.io/Leaflet.glify
MIT License
480 stars 85 forks source link

Build fails #151

Open hokascha opened 6 months ago

hokascha commented 6 months ago

Hi,

I am trying to build but get lot's of errors. First I followed the documentation:

$ yarn run build-browser
yarn run v1.21.1
error Command "build-browser" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

or

$ yarn run build-browser-webpack
yarn run v1.21.1
error Command "build-browser-webpack" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

finally I tried:

$ yarn run build
yarn run v1.21.1
$ webpack --config webpack.config.js
Hash: 3aa362769767530af11b5595a5c3c0a36116fcd5
Version: webpack 4.47.0
Child
    Hash: 3aa362769767530af11b
    Time: 3132ms
    Built at: 25.03.2024 12:29:40
     2 assets
    Entrypoint main = glify-browser.js glify-browser.js.map
    [0] external {"commonjs":"leaflet","commonjs2":"leaflet","amd":"leaflet","root":"L"} 42 bytes {0} [built]
    [1] ./src/base-gl-layer.ts 456 bytes {0} [built] [failed] [2 errors]
    [2] ./src/shapes.ts 449 bytes {0} [built] [failed] [2 errors]
    [3] ./src/index.ts + 12 modules 39.4 KiB {0} [built]
        | ./src/index.ts 4.38 KiB [built]
        | ./src/utils.ts 2.86 KiB [built]
        | ./src/lines.ts 14.3 KiB [built]
        | ./src/points.ts 11.8 KiB [built]
        | ./src/shader/vertex/default.glsl 355 bytes [built]
        | ./src/shader/fragment/dot.glsl 598 bytes [built]
        | ./src/shader/fragment/point.glsl 1.06 KiB [built]
        | ./src/shader/fragment/puck.glsl 944 bytes [built]
        | ./src/shader/fragment/simple-circle.glsl 326 bytes [built]
        | ./src/shader/fragment/square.glsl 170 bytes [built]
        | ./src/shader/fragment/polygon.glsl 178 bytes [built]
        | ./src/color.ts 1.22 KiB [built]
        | ./src/line-feature-vertices.ts 1.26 KiB [built]

    ERROR in ./src/base-gl-layer.ts
    Module build failed (from ./node_modules/ts-loader/index.js):
    Error: TypeScript emitted no output for /tmp/Leaflet.glify-master/src/base-gl-layer.ts.
        at makeSourceMapAndFinish (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:53:18)
        at successLoader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:40:5)
        at Object.loader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:23:5)
     @ ./src/lines.ts 2:0-47 30:27-38
     @ ./src/index.ts

    ERROR in ./src/shapes.ts
    Module build failed (from ./node_modules/ts-loader/index.js):
    Error: TypeScript emitted no output for /tmp/Leaflet.glify-master/src/shapes.ts.
        at makeSourceMapAndFinish (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:53:18)
        at successLoader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:40:5)
        at Object.loader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:23:5)
     @ ./src/index.ts 3:0-34 31:22-28

    ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.test.ts(44,5)
          TS2741: Property 'popup' is missing in type '{ type: string; latlng: LatLng; layerPoint: Point; containerPoint: Point; originalEvent: MouseEvent; target: string; sourceTarget: string; propagatedFrom: string; layer: TestLayer; }' but required in type 'LeafletMouseEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.ts
    ./src/base-gl-layer.ts 315:27-37
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.ts(315,28)
          TS2345: Argument of type 'CanvasOverlay' is not assignable to parameter of type 'Layer'.
      Types of property 'options' are incompatible.
        Type 'LayerOptions | undefined' is not assignable to type 'LayerOptions'.
          Type 'undefined' is not assignable to type 'LayerOptions'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts(200,15)
          TS2741: Property 'popup' is missing in type '{ oldSize: Point; newSize: Point; type: string; target: CanvasOverlay; sourceTarget: string; propagatedFrom: string; layer: CanvasOverlay; }' but required in type 'ResizeEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts(292,13)
          TS2741: Property 'popup' is missing in type '{ type: string; target: HTMLCanvasElement; sourceTarget: string; propagatedFrom: string; layer: CanvasOverlay; center: LatLng; zoom: number; noUpdate: true; }' but required in type 'ZoomAnimEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts(313,13)
          TS2741: Property 'popup' is missing in type '{ type: string; target: HTMLCanvasElement; sourceTarget: string; propagatedFrom: string; layer: CanvasOverlay; center: LatLng; zoom: number; noUpdate: true; }' but required in type 'ZoomAnimEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts(48,3)
          TS2416: Property 'options' in type 'CanvasOverlay' is not assignable to the same property in base type 'Layer'.
      Type 'LayerOptions | undefined' is not assignable to type 'LayerOptions'.
        Type 'undefined' is not assignable to type 'LayerOptions'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts(137,18)
          TS2345: Argument of type 'this' is not assignable to parameter of type 'Layer'.
      Type 'CanvasOverlay' is not assignable to type 'Layer'.
        Types of property 'options' are incompatible.
          Type 'LayerOptions | undefined' is not assignable to type 'LayerOptions'.
            Type 'undefined' is not assignable to type 'LayerOptions'.

    ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts(505,7)
          TS2741: Property 'popup' is missing in type '{ type: string; target: Map; sourceTarget: Map; propagatedFrom: string; layer: Lines; latlng: LatLng; layerPoint: Point; containerPoint: Point; originalEvent: MouseEvent; }' but required in type 'LeafletMouseEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts(589,7)
          TS2741: Property 'popup' is missing in type '{ type: string; target: Map; sourceTarget: Map; propagatedFrom: string; layer: Lines; latlng: LatLng; layerPoint: Point; containerPoint: Point; originalEvent: MouseEvent; }' but required in type 'LeafletMouseEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/shapes.ts
    ./src/shapes.ts 334:8-20
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/shapes.ts(334,9)
          TS2741: Property 'coordinates' is missing in type 'Feature<Polygon, GeoJsonProperties>' but required in type 'Polygon'.
Child
    Hash: 5595a5c3c0a36116fcd5
    Time: 3639ms
    Built at: 25.03.2024 12:29:41
     2 assets
    Entrypoint main = glify.js glify.js.map
    [0] external {"commonjs":"leaflet","commonjs2":"leaflet","amd":"leaflet","root":"L"} 42 bytes {0} [built]
    [1] ./src/base-gl-layer.ts 456 bytes {0} [built] [failed] [2 errors]
    [2] ./src/shapes.ts 449 bytes {0} [built] [failed] [2 errors]
    [3] ./src/index.ts + 12 modules 39.4 KiB {0} [built]
        | ./src/index.ts 4.38 KiB [built]
        | ./src/utils.ts 2.86 KiB [built]
        | ./src/lines.ts 14.3 KiB [built]
        | ./src/points.ts 11.8 KiB [built]
        | ./src/shader/vertex/default.glsl 355 bytes [built]
        | ./src/shader/fragment/dot.glsl 598 bytes [built]
        | ./src/shader/fragment/point.glsl 1.06 KiB [built]
        | ./src/shader/fragment/puck.glsl 944 bytes [built]
        | ./src/shader/fragment/simple-circle.glsl 326 bytes [built]
        | ./src/shader/fragment/square.glsl 170 bytes [built]
        | ./src/shader/fragment/polygon.glsl 178 bytes [built]
        | ./src/color.ts 1.22 KiB [built]
        | ./src/line-feature-vertices.ts 1.26 KiB [built]

    ERROR in ./src/base-gl-layer.ts
    Module build failed (from ./node_modules/ts-loader/index.js):
    Error: TypeScript emitted no output for /tmp/Leaflet.glify-master/src/base-gl-layer.ts.
        at makeSourceMapAndFinish (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:53:18)
        at successLoader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:40:5)
        at Object.loader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:23:5)
     @ ./src/points.ts 1:0-46 29:28-39
     @ ./src/index.ts

    ERROR in ./src/shapes.ts
    Module build failed (from ./node_modules/ts-loader/index.js):
    Error: TypeScript emitted no output for /tmp/Leaflet.glify-master/src/shapes.ts.
        at makeSourceMapAndFinish (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:53:18)
        at successLoader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:40:5)
        at Object.loader (/tmp/Leaflet.glify-master/node_modules/ts-loader/dist/index.js:23:5)
     @ ./src/index.ts 3:0-34 31:22-28

    ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.test.ts(44,5)
          TS2741: Property 'popup' is missing in type '{ type: string; latlng: LatLng; layerPoint: Point; containerPoint: Point; originalEvent: MouseEvent; target: string; sourceTarget: string; propagatedFrom: string; layer: TestLayer; }' but required in type 'LeafletMouseEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.ts
    ./src/base-gl-layer.ts 315:27-37
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/base-gl-layer.ts(315,28)
          TS2345: Argument of type 'CanvasOverlay' is not assignable to parameter of type 'Layer'.
      Types of property 'options' are incompatible.
        Type 'LayerOptions | undefined' is not assignable to type 'LayerOptions'.
          Type 'undefined' is not assignable to type 'LayerOptions'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts(200,15)
          TS2741: Property 'popup' is missing in type '{ oldSize: Point; newSize: Point; type: string; target: CanvasOverlay; sourceTarget: string; propagatedFrom: string; layer: CanvasOverlay; }' but required in type 'ResizeEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts(292,13)
          TS2741: Property 'popup' is missing in type '{ type: string; target: HTMLCanvasElement; sourceTarget: string; propagatedFrom: string; layer: CanvasOverlay; center: LatLng; zoom: number; noUpdate: true; }' but required in type 'ZoomAnimEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.test.ts(313,13)
          TS2741: Property 'popup' is missing in type '{ type: string; target: HTMLCanvasElement; sourceTarget: string; propagatedFrom: string; layer: CanvasOverlay; center: LatLng; zoom: number; noUpdate: true; }' but required in type 'ZoomAnimEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts(48,3)
          TS2416: Property 'options' in type 'CanvasOverlay' is not assignable to the same property in base type 'Layer'.
      Type 'LayerOptions | undefined' is not assignable to type 'LayerOptions'.
        Type 'undefined' is not assignable to type 'LayerOptions'.

    ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/canvas-overlay.ts(137,18)
          TS2345: Argument of type 'this' is not assignable to parameter of type 'Layer'.
      Type 'CanvasOverlay' is not assignable to type 'Layer'.
        Types of property 'options' are incompatible.
          Type 'LayerOptions | undefined' is not assignable to type 'LayerOptions'.
            Type 'undefined' is not assignable to type 'LayerOptions'.

    ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts(505,7)
          TS2741: Property 'popup' is missing in type '{ type: string; target: Map; sourceTarget: Map; propagatedFrom: string; layer: Lines; latlng: LatLng; layerPoint: Point; containerPoint: Point; originalEvent: MouseEvent; }' but required in type 'LeafletMouseEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/lines.test.ts(589,7)
          TS2741: Property 'popup' is missing in type '{ type: string; target: Map; sourceTarget: Map; propagatedFrom: string; layer: Lines; latlng: LatLng; layerPoint: Point; containerPoint: Point; originalEvent: MouseEvent; }' but required in type 'LeafletMouseEvent'.

    ERROR in /tmp/Leaflet.glify-master/src/shapes.ts
    ./src/shapes.ts 334:8-20
    [tsl] ERROR in /tmp/Leaflet.glify-master/src/shapes.ts(334,9)
          TS2741: Property 'coordinates' is missing in type 'Feature<Polygon, GeoJsonProperties>' but required in type 'Polygon'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

so, how can I build?

hokascha commented 6 months ago

for anyone interested, I found the file on unpkg: https://unpkg.com/browse/leaflet.glify@3.2.0/dist/

trafficonese commented 4 months ago

what if you just use npm run build?

I think the Readme is wrong. This commit 423c88a simplified the build process to just use webpack.