When I am trying to import proj4 in my angular project I am getting an error
Error: export 'defs' (imported as 'proj4') was not found in 'proj4' (possible exports: default)
I am importing as
import * as proj4 from 'proj4';
Though I have installed the proj4 as
npm install --save @types/proj4
How can I solve this issue? Am I missing something here ?
According to https://github.com/proj4js/proj4js/issues/247, for Typescript:
import proj4 from 'proj4';allowSyntheticDefaultImports: truemust be set intsconfig.jsonThis solved the issue for me for TypeScript 4.8 and Proj4 2.8.