ng2-translate.js?6935:1 Uncaught SyntaxError: Unexpected token export(…)
See original GitHub issueI’m submitting a … (check one with “x”)
[X ] bug report => check the FAQ and search github for a similar issue or PR before submitting
[ ] support request => check the FAQ and search github for a similar issue before submitting
[ ] feature request
Current behavior
Doesn’t load when used in the constructor of the top level app compnent… Following the example from the plunker: http://plnkr.co/edit/btpW3l0jr5beJVjohy1Q?p=preview the result when trying to load the app is:
ng2-translate.js?6935:1 Uncaught SyntaxError: Unexpected token export(…)
`export * from ‘./index’;
/***************** ** WEBPACK FOOTER ** ./~/ng2-translate/ng2-translate.js ** module id = 426 ** module chunks = 1 **/`
Expected/desired behavior The existing angular2 app to load
Reproduction of the problem
"dependencies": { "@angular/common": "2.1.0", "@angular/compiler": "2.1.0", "@angular/core": "2.1.0", "@angular/forms": "2.1.0", "@angular/http": "2.1.0", "@angular/platform-browser": "2.1.0", "@angular/platform-browser-dynamic": "2.1.0", "@angular/router": "3.1.0", "@ngrx/core": "1.2.0", "@ngrx/store": "2.2.1", "angular-pipes": "^2.0.5", "angular2-infinite-scroll": "^0.1.92", "angular2-moment": "^0.8.1", "angular2-template-loader": "^0.5.0", "ckeditor": "^4.5.8", "core-js": "^2.4.0", "moment": "^2.6.0", "moment-timezone": "^0.5.6", "ng2-bootstrap": "1.1.16", "ng2-ckeditor": "^1.0.3", "ng2-dnd": "^2.0.1", "ng2-file-upload": "1.0.3", "ng2-page-scroll": "3.2.1", "ng2-translate": "^4.0.0", "reflect-metadata": "^0.1.3", "rxjs": "5.0.0-beta.12", "zone.js": "^0.6.26" },
Please tell us about your environment: Using webpack to build the typescript files
-
ng2-translate version: “ng2-translate”: “^4.0.0”,
-
Angular version: “@angular/common”: “2.1.0”, “@angular/compiler”: “2.1.0”, “@angular/core”: “2.1.0”, “@angular/forms”: “2.1.0”, “@angular/http”: “2.1.0”,
-
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
-
Language: “typescript”: “^2.0.6”,
Issue Analytics
- State:
- Created 7 years ago
- Comments:13
Top GitHub Comments
Yes, it’s updated now !
Hello, you didn’t link the right plunkr, because it’s working on this one (and I think it’s the default one).
Also I can almost immediately tell you that the problem is that you import from
ng2-translate/ng2-translate
instead of justng2-translate