Skip to content

Commit 1e58df4

Browse files
committed
fix: resolve leaflet runtime error and next config type error
1 parent b451e4b commit 1e58df4

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

frontend/next-env.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference types="next" />
22
/// <reference types="next/image-types/global" />
3-
import './.next/dev/types/routes.d.ts';
3+
import "./.next/dev/types/routes.d.ts";
44

55
// NOTE: This file should not be edited
66
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

frontend/next.config.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const nextConfig: NextConfig = {
66
turbopack: {
77
root: path.resolve(__dirname, '..'),
88
},
9-
eslint: {
10-
ignoreDuringBuilds: true,
11-
},
9+
// eslint: {
10+
// ignoreDuringBuilds: true,
11+
// },
1212
typescript: {
1313
ignoreBuildErrors: true,
1414
},

frontend/src/components/analysis/LocationMap.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function LocationMap({ latitude, longitude, label }: LocationMapProps) {
2929
// Fix for Leaflet default icon paths in Next.js
3030
if (typeof window !== 'undefined') {
3131
const L = require('leaflet');
32-
L.Icon.Default.prototype._getIconUrl = undefined;
32+
// Use a more robust way to fix icon paths
3333
L.Icon.Default.mergeOptions({
3434
iconRetinaUrl: 'https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon-2x.png',
3535
iconUrl: 'https://unpkg.com/leaflet@1.9.4/dist/images/marker-icon.png',

0 commit comments

Comments
 (0)