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.

Angular Universal: SyntaxError: Unexpected token import

See original GitHub issue

Update 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:closed
  • Created 6 years ago
  • Reactions:20
  • Comments:26 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
AnthonyNahascommented, Feb 15, 2018
2reactions
valorkincommented, Nov 25, 2017

This is why such questions should be on stack overwflow, so ppl can google it

Read more comments on GitHub >

github_iconTop 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 >

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