theAlgorithmist/Angular2Leaflet

Typings are broken

Opened this issue · 1 comments

upon ng build console is flooded with errors around typings.

I tried "npm install @types/leaflet" which didn't help.

After "npm uninstall @types/leaflet" those errors went away and I was left with several "Cannot fine module 'leaflet'."

I took a hint from the inspiring repo and created my own typing then re-installed @types/leaflet, which worked.

Had a similar problem here. Good news: the code works without modifications in Angular 5.1!
Here a working example of package.json.

{
"name": "Angular2CLI-Leaflet",
"description": "MVP for Angular2, Angular2 CLI and Leaflet, based on A2 leaflet starter",
"keywords": [
"angular2",
"leaflet"
],
"author": "Jim Armstrong (www.algorithmist.net)",
"version": "1.0.0",
"license": "Apache-2.0",
"angular-cli": {},
"scripts": {
"ng": "ng",
"start": "ng serve",
"lint": "tslint "src//*.ts" --project src/tsconfig.json --type-check && tslint "e2e//*.ts" --project e2e/tsconfig.json --type-check",
"test": "ng test",
"pree2e": "webdriver-manager update --standalone false --gecko false",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/animations": "^5.1.0",
"@angular/common": "^5.1.0",
"@angular/compiler": "^5.1.0",
"@angular/core": "^5.1.0",
"@angular/forms": "^5.1.0",
"@angular/http": "^5.1.0",
"@angular/language-service": "^5.1.0",
"@angular/platform-browser": "^5.1.0",
"@angular/platform-browser-dynamic": "^5.1.0",
"@angular/platform-server": "^5.1.0",
"@angular/router": "^5.1.0",
"bootstrap": "^4.0.0-beta.2",
"core-js": "^2.5.1",
"font-awesome": "^4.7.0",
"karma-remap-istanbul": "^0.6.0",
"leaflet": "^1.2.0",
"rxjs": "^5.5.5",
"ts-helpers": "^1.1.2",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "^1.5.5",
"@angular/compiler-cli": "^5.1.0",
"@types/geojson": "^7946.0.0",
"@types/jasmine": "2.5.38",
"@types/leaflet": "^1.2.3",
"@types/node": "^6.0.92",
"codelyzer": "^4.0.1",
"jasmine-core": "~2.6.2",
"jasmine-spec-reporter": "~4.1.0",
"karma": "^1.7.1",
"karma-chrome-launcher": "^2.2.0",
"karma-cli": "^1.0.1",
"karma-coverage-istanbul-reporter": "^1.2.1",
"karma-jasmine": "^1.1.1",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "^5.2.1",
"ts-node": "^3.3.0",
"tslint": "^5.8.0",
"typescript": "~2.4.2"
}
}