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

Build fails #151

Open
hokascha opened this issue Mar 25, 2024 · 2 comments
Open

Build fails #151

hokascha opened this issue Mar 25, 2024 · 2 comments

Comments

@hokascha
Copy link

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
Copy link
Author

for anyone interested, I found the file on unpkg:
https://unpkg.com/browse/[email protected]/dist/

@trafficonese
Copy link
Contributor

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.

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