You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got this error when tried to run my node server.js
/projects/my_project/angular/node_modules/ngx-bootstrap/modal/modal-backdrop.component.js:1
(function (exports, require, module, __filename, __dirname) { import { Component, ElementRef, Renderer2 } from '@angular/core';
^^^^^^
SyntaxError: Unexpected token import
at createScript (vm.js:80:10)
at Object.runInThisContext (vm.js:139:10)
at Module._compile (module.js:616:28)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.IBu+ (/projects/my_project/angular/dist/dist-server/main.bundle.js:1:272046)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve:universal: `npm run build:universal && cd dist && node server`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve:universal script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/hoangquan/.npm/_logs/2018-07-12T04_29_25_851Z-debug.log
It's seem node does not understand import command, right?
I'm using node version v8.11.3
I did use Babel to my project too, But It does'nt help. :(
Have you any suggestions? @m98 , thanks
The text was updated successfully, but these errors were encountered:
I got this error when tried to run my node server.js
It's seem node does not understand
import
command, right?I'm using node version
v8.11.3
I did use
Babel
to my project too, But It does'nt help. :(Have you any suggestions? @m98 , thanks
The text was updated successfully, but these errors were encountered: