How can I import the "geojson" package into my Angular 6 project?
I previously had the following in my Angular 5.2 project.
import GeoJson = require("geojson");
import WKT = require("terraformer-wkt-parser");
I've since upgraded to Angular 6 and now I get runtime error:
error TS1202: Import assignment cannot be used when targeting ECMAScript modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.
So I checked out this SO Question . That doesn't appear to work since the values now have certain values.
So I then tried:
import GeoJson from "geojson";
But I still get runtime error:
Module '"C:/Dev/MyProject/ClientApp/node_modules/@types/geojson/index"' has no default export.
EDIT: Reformatted so that import line stood out.