Please install the package manually to see if it resolves the issue.
(Node Js 22.0 used here in my case)
npm install --save-dev @types/geojson
If it does not resolve the issue, please follow below steps (tested, able to load map with below changes)
-
npm install --save-dev typescript@5.8 - Apply the
tsconfig.jswith below changes.{ "compileOnSave": false, "compilerOptions": { /* ✅ Modern TypeScript target & module settings */ "target": "ES2022", // good default for Angular 20 "module": "ESNext", // ensures modern module syntax for TS 5.8 "moduleResolution": "bundler", // recommended for Angular 20 + TS ≥5.5 /* ✅ Type checking options */ "strict": true, "noImplicitOverride": true, "noPropertyAccessFromIndexSignature": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, /* ✅ Compilation performance / library compatibility */ "skipLibCheck": true, // keep this true to silence 3rd-party d.ts issues "isolatedModules": true, "esModuleInterop": true, // ensures smooth interop with CJS libraries "forceConsistentCasingInFileNames": true, /* ✅ Decorators & helpers */ "experimentalDecorators": true, "importHelpers": true, /* ✅ Output and module format (unchanged) */ "sourceMap": true, "outDir": "./out-tsc", /* ✅ Libs that TS 5.8 expects for DOM apps */ "lib": ["ES2022", "DOM", "DOM.Iterable"] }, "angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, "typeCheckHostBindings": true, "strictTemplates": true }, "files": [], "references": [ { "path": "./tsconfig.app.json" }, { "path": "./tsconfig.spec.json" } ] } - Ensure Angular CLI and all dependencies are updated (
ng update). - Keep
"skipLibCheck": trueif using 3rd-party libraries with outdated typings. - install
@types/geojson- npm install --save-dev @types/geojson
Reference - https://learn.microsoft.com/en-us/azure/azure-maps/how-to-use-npm-package
Hope it fixes the issue at your side.
Thank you.