Angular Universal: SyntaxError: Unexpected token import
See original GitHub issueUpdate by @valorkin : blocked by Angular-CLI angular/angular-cli#7200
Hi Guys, Thank you for your great work!
I’m trying to make ngx-bootstrap work with Universal but getting this error when trying to run:
node_modules/ngx-bootstrap/modal/modal-backdrop.component.js:1
(function (exports, require, module, __filename, __dirname) { import { Component, ElementRef, Renderer } from '@angular/core';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:53:10)
at Object.runInThisContext (vm.js:95:10)
at Module._compile (module.js:543:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.IBu+ (/private/var/folders/7w/snfpnc0x7yd302z6rsfs69zc0000gn/T/fbfn_10215rsiZqtRl494A/dist-server/main.a7ad34b20e2d30c271dd.bundle.js:1:146690)
Any suggestions?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:20
- Comments:26 (6 by maintainers)
Top Results From Across the Web
Unexpected token import with Angular Universal #3962 - GitHub
My problem happens when i want to prerender the page without an express server. To reproduce my issue, you can follow the AppShell...
Read more >Angular Universal - SyntaxError: Unexpected token import
When the migration is complete, you will access your Teams at stackoverflowteams.com, and they will no longer appear in the left sidebar on ......
Read more >missing file lib/angular2-modal/plugins/bootstrap.js
I am working on angular2-modal popup, after compiling when I try to launch the application I am getting this error in browser console,...
Read more >Unit-Test errors: SyntaxError: Unexpected token export
I upgraded my project from the PRO version downloaded as *zip folder to an installation with npm and my received gitlab account. Now...
Read more >angular/universal - Gitter
Hi, I'm using the quick start guide of Angular Universal but when I run node server.ts (node v6.11.1) I get this error SyntaxError:...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@abhijithmannath take a look on this thread
solving angular universal issues
This is why such questions should be on stack overwflow, so ppl can google it