-
-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ng build - Unexpected token import error. #581
Comments
Hi! I have the same issue. I prepared an example for reproduce: [email protected]:SergiusSidorov/cli-universal-demo.git |
I fixed the issue. The issue was in the build configuration. @ngx-translate module should be transpilled. Can be resolved by specifying @ngx-translate in webpack.config.js. |
@SergiusSidorov I got error with build using link per your suggestion.
I added to whitelist and build script using webpage.
|
I think, the mistake in build script. You are use
but should be
You should use the compiled version of the server script. Then execute |
thanks @SergiusSidorov finally got it running, now i got this error when i go to url address.
|
@premiumwd How did you resolve your problem? |
@KlaudiaMor how did your application go? do you have fix for this? @premiumwd I tried yours but I still have the same error everytime I put something inside the TranslateModule.forRoot() |
I have the same problem, ejected the webpack config using the CLI and added this:
then running:
Still get the original error:
|
I fixed the issue as i move all bundles files to the root of the module! before: after: the same procedure for all umd.js files ! |
i forked the repo few days ago and i made some updates! So the solution is the following:
Cheers, no more |
Hi @AnthonyNahas, thanks for your work. I am just wondering if by any chance you have any idea on the following AoT Error. The problem is different with unexpected token, but you may have any idea on this matter, since you generally solved the unexpected token import. Appreciate the lead, been trying to solve this for days with no progress. |
Hi, I met the same problem when using universal with @ngrx |
@AnthonyNahas I'm using Ionic 3, and calling ionic cordova build android --prod. I opened an issue on it here: #666. Thanks so much! |
@AnthonyNahas I think you wait on our feedback, so for me your solution work perfectly. Thank you! I had another error but it was connected with wrong json import. |
@AnthonyNahas - can you look help us also with localize-router? I think that it's the same problem. Maybe you can give me a tips how I can manage with this problem?
|
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
…ors" BREAKING CHANGE: I've finally taken the time to update the entire build system for the library using ng-packagr instead of my own custom webpack config. I've also added support for rxjs lettable operators at the same time, it means that I've been forced to add a peer dependency for RxJS >= 5.5.2. and I've updated the minimum Angular version to >=5.0.0. The library should be much smaller (from ~80ko to ~20ko for the umd bundle!) and it now supports ES2015 to be tree-shackable which might drop the size even more. It should also fix the "Unexpected token import errors" that some people were experiencing. Unfortunately this might be breaking people since the peer dependency have changed and that's why it's a new major version. Closes #724, Fixes #581
I'm submitting a ... (check one with "x")
app.server.ts
server.ts
The text was updated successfully, but these errors were encountered: