DEV Community

Discussion on: PWAs with Angular: Being Fast

Collapse
 
playground profile image
playground

Hi Michael,

When I try to apply app-shell as such

ngu-app-shell.js --module src/app/app.module.ts --out dist/index.html

(function (exports, require, module, __filename, __dirname) { import { Inject, Injectable, NgModule } 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. (/Users/sandbox/src/app/app.module.ts:6:1)

app.module.ts:6:1 where it is referencing my private npm module

Collapse
 
michaelsolati profile image
Michael Solati

What machine are you running your code on? There have been a slew of issues and difficulties faced by windows users. Also if you have your code up on github or something like that I can take a peak and see whats going on... There can be a slew of moving parts here that can throw off your results.