Closed VyshnnaviP closed 8 years ago
Seems like you installed highcharts typings. https://github.com/gevgeny/angular2-highcharts/issues/33 this should help you. But basically just remove from your typings folder the highcharts typings files. Only thing you need is to install highcharts and angular2-highcharts and your good to go no need to install any typings (unless your using some kind of library's).
if it helps here is mine package.json
{
"name": "someName",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
"lite": "lite-server",
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"typings": "typings"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@angular/common": "2.0.0-rc.3",
"@angular/compiler": "2.0.0-rc.3",
"@angular/core": "2.0.0-rc.3",
"@angular/forms": "0.1.1",
"@angular/http": "2.0.0-rc.3",
"@angular/platform-browser": "2.0.0-rc.3",
"@angular/platform-browser-dynamic": "2.0.0-rc.3",
"@angular/router": "3.0.0-alpha.7",
"@angular/router-deprecated": "2.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.3",
"angular2-highcharts": "^0.1.0",
"angular2-in-memory-web-api": "0.0.12",
"bootstrap": "^3.3.6",
"core-js": "^2.4.0",
"highcharts": "^4.2.5",
"jquery": "^3.0.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.6",
"systemjs": "0.19.27",
"zone.js": "^0.6.12"
},
"devDependencies": {
"concurrently": "^2.0.0",
"lite-server": "^2.2.0",
"typescript": "^1.8.10",
"typings": "^1.0.4"
}
}
typings.json
{
"globalDependencies": {
"core-js": "registry:dt/core-js#0.0.0+20160602141332",
"jasmine": "registry:dt/jasmine#2.2.0+20160621224255",
"node": "registry:dt/node#6.0.0+20160621231320"
}
}
and tsconfig.json
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/index",
"typings/index.d.ts"
]
}
Thank you! That solved it.
Hi, I am learning angular2 and some associated graphing tools. I seem to be having a problem using angular2-highcharts. When I try to run using npm start, the following error occurs(for multiple lines):
typings/globals/highcharts/index.d.ts... getting error TS2300: Duplicate identifier.....
I went through a few solutions suggested in similar issues. I modified the tsconfig file to include an exclude portion to exclude node_modules, but that didn't work. Since am new to angular and typescript, I am not sure if I am missing something very basic here.