2017-02-26 10 views
1

내 ionic 2에서 최신 ionic-native (2.5.1)로 업데이트 한 후 터미널에 "ionic serve"를 실행하면 Typescript 오류가 발생합니다. 계획. typescript를 버전 2.x로 업데이트하려고했지만 여전히 작동하지 않습니다. 도와주세요.ionic 2 Typicript Error TS1005가 ionic-native로 업데이트 된 후 2.5.1

오류 메시지 :

TypeScript error: ../ionic2/ionic2-angularfire-sample-master/node_modules/ionic-native/dist/es5/plugins/mixpanel.d.ts(74,21): Error TS1005: '=' expected. 
TypeScript error: ../ionic2/ionic2-angularfire-sample-master/node_modules/ionic-native/dist/es5/plugins/mixpanel.d.ts(74,27): Error TS1005: ';' expected. 
TypeScript error: ../ionic2/ionic2-angularfire-sample-master/node_modules/ionic-native/dist/es5/plugins/mixpanel.d.ts(74,29): Error TS1068: Unexpected token. A constructor, method, accessor, or property was expected. 
TypeScript error: ../ionic2/ionic2-angularfire-sample-master/node_modules/ionic-native/dist/es5/plugins/mixpanel.d.ts(75,1): Error TS1128: Declaration or statement expected. 

내 이온 정보 :

Your system information: 
Cordova CLI: 6.4.0 
Ionic Framework Version: 2.0.0-beta.11 
Ionic CLI Version: 2.1.1 
Ionic App Lib Version: 2.1.1 

내 package.json : TSC -v에

{ 
    "dependencies": { 
    "@angular/common": "2.0.0-rc.4", 
    "@angular/compiler": "2.0.0-rc.4", 
    "@angular/core": "2.0.0-rc.4", 
    "@angular/forms": "0.2.0", 
    "@angular/http": "2.0.0-rc.4", 
    "@angular/platform-browser": "2.0.0-rc.4", 
    "@angular/platform-browser-dynamic": "2.0.0-rc.4", 
    "@angular/router": "2.0.0-rc.2", 
    "@types/core-js": "^0.9.35", 
    "@types/lodash": "^4.14.53", 
    "angular": "^1.6.2", 
    "angularfire2": "2.0.0-beta.2", 
    "es6-shim": "0.35.0", 
    "firebase": "3.3.0", 
    "ionic-angular": "2.0.0-beta.11", 
    "ionic-native": "^2.5.1", 
    "ionicons": "3.0.0", 
    "moment": "2.13.0", 
    "reflect-metadata": "0.1.3", 
    "rxjs": "5.0.0-beta.6", 
    "zone.js": "0.6.12" 
    }, 
    "devDependencies": { 
    "@ionic/app-scripts": "^1.1.4", 
    "del": "2.2.0", 
    "gulp": "3.9.1", 
    "gulp-tsc": "^1.3.0", 
    "gulp-tslint": "^5.0.0", 
    "gulp-watch": "4.3.5", 
    "ionic-gulp-browserify-typescript": "^1.1.0", 
    "ionic-gulp-fonts-copy": "^1.0.0", 
    "ionic-gulp-html-copy": "^1.0.0", 
    "ionic-gulp-sass-build": "^1.0.0", 
    "ionic-gulp-scripts-copy": "^2.0.0", 
    "ionic-gulp-tslint": "^1.0.0", 
    "run-sequence": "1.1.5", 
    "tslint": "^3.10.1", 
    "tslint-ionic-rules": "^0.0.3", 
    "gulp-typescript": "^2.13.6", 
    "typescript": "^2.0.2", 
    "typings": "^2.1.0" 

내 타이프 라이터 버전 :

Version 2.2.1 

도와주세요. 고맙습니다!!!

+0

** ** mixpanel.ts ** 파일로 게시물을 업데이트하십시오. – Aravind

답변

0

여기에 많은 문제가 있습니다.

귀하의 이온 프레임 워크는 베타입니다.

npm install -g [email protected]을 수행해야합니다.

Ionic 프로젝트의 최신 종속성을 얻으려면 package.json에서 시작 기베이스 here을 참조하십시오. ionic start proj --v2 template_name을 수행 할 때 다운로드되는 종속성입니다.

참고 : 이 패키지조차도 이온 성 네이티브 버전 2.4.1을 지정하고 앱 스크립트는 1.1.3으로 지정합니다.

+0

답장을 보내 주셔서 감사합니다. 'npm install -g ionic @ latest'를 실행 한 후에, 'Error : 모듈을 찾을 수 없습니다'@ angular/tsc-wrapped/src/tsc '라는 또 다른 문제가 발생했습니다. 도와주세요. @suraj –

+0

package.json을 확인 했습니까? –

+0

새 프로젝트에서 만든 새 package.json을 현재 프로젝트에 넣어야한다는 의미입니까? –