We are developing an application in Angular5. Now we are integrating SSR with our project. We installed express engine and platform server, also followed every steps needed for SSR.
While we building the application it was successful. When we run the command npm run serve, it will call node server.js. At this time it is throwing the error as below:
node_modules@ng-bootstrap\ng-bootstrap\modal\modal-stack.js:1 import { DOCUMENT } from '@angular/common'; ^^^^^^
SyntaxError: Cannot use import statement outside a module at Module._compile (internal/modules/cjs/loader.js:892:18) at Object.Module._extensions..js (internal/modules/cjs/loader.js:973:10) at Module.load (internal/modules/cjs/loader.js:812:32) at Function.Module._load (internal/modules/cjs/loader.js:724:14) at Module.require (internal/modules/cjs/loader.js:849:19) at require (internal/modules/cjs/helpers.js:74:18)
It is ng-bootstrap module we use. Anyone can give clue why this error?
Thanks!