question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ng2-translate.js?6935:1 Uncaught SyntaxError: Unexpected token export(…)

See original GitHub issue

I’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:closed
  • Created 7 years ago
  • Comments:13

github_iconTop GitHub Comments

1reaction
ocombecommented, Nov 4, 2016

Yes, it’s updated now !

1reaction
ocombecommented, Nov 4, 2016

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 just ng2-translate

Read more comments on GitHub >

github_iconTop Results From Across the Web

lang.js:21 Uncaught SyntaxError: Unexpected token export
You can fix this issue by using a babel-loader in your webpack.config.js npm install --save-dev babel-loader babel-preset-es2015. after that you can add
Read more >
Uncaught SyntaxError: Unexpected token export #543 - GitHub
Uncaught SyntaxError : Unexpected token export. Here's the line where the error originates (angularfire2/index.js):. export * from '.
Read more >
How to Fix „Uncaught SyntaxError: Unexpected token 'export
Yet, we fought the „Unexpected token export ” error. It told us that the export keyword isn't available when importing the bundled ...
Read more >
Uncaught SyntaxError: Unexpected token 'export' - GSAP
Hello. I'm currently attempting to initiate ScrollSmoother but I'm getting the error Uncaught SyntaxError: Unexpected token 'export.
Read more >
Uncaught SyntaxError: Unexpected token 'export' - DigitalOcean
When I use this exactly same code to setup in my project to get payments from clients via Stripe, I still get an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found