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
Node can start the Express server with node dist/server
What is the current behavior?
`> node dist/server
/Users/jrulitschka/Documents/_/Training/2018/FLF.ME/git/frontend-spa/dist/server.js:117
var app = express();
^
TypeError: express is not a function
at Object. (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:117:11)
at webpack_require (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:20:30)
at result (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:84:18)
at Object. (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:87:10)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)`
And in file server.js there is a different structure than in my project, see: Object.defineProperty(exports, "__esModule", { value: true }); __webpack_require__(1); var core_1 = __webpack_require__(6); // Express Engine var express_engine_1 = __webpack_require__(206); // Import module map for lazy loading var module_map_ngfactory_loader_1 = __webpack_require__(277); var express = __importStar(__webpack_require__(278)); var path_1 = __webpack_require__(285); // Faster server renders w/ Prod mode (dev mode never needed) core_1.enableProdMode(); // Express server var app = express();
I've just added Angular Universial via angular CLI ng add @nguniversal/express-engine --clientProject [name] to an existing project. The file server.js (but not the server.ts!) looks different to a new Angular project with SSR.
What is the use-case or motivation for changing an existing behavior?
Bug Report
What is the expected behavior?
Node can start the Express server with node dist/server
What is the current behavior?
`> node dist/server
/Users/jrulitschka/Documents/_/Training/2018/FLF.ME/git/frontend-spa/dist/server.js:117
var app = express();
^
TypeError: express is not a function
at Object. (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:117:11)
at webpack_require (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:20:30)
at result (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:84:18)
at Object. (/Users/jrulitschka/Documents//Training/2018/FLF.ME/git/frontend-spa/dist/server.js:87:10)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)`
And in file server.js there is a different structure than in my project, see:
Object.defineProperty(exports, "__esModule", { value: true }); __webpack_require__(1); var core_1 = __webpack_require__(6); // Express Engine var express_engine_1 = __webpack_require__(206); // Import module map for lazy loading var module_map_ngfactory_loader_1 = __webpack_require__(277); var express = __importStar(__webpack_require__(278)); var path_1 = __webpack_require__(285); // Faster server renders w/ Prod mode (dev mode never needed) core_1.enableProdMode(); // Express server var app = express();
What modules are related to this issue?
Minimal reproduction with instructions:
I've just added Angular Universial via angular CLI
ng add @nguniversal/express-engine --clientProject [name]
to an existing project. The file server.js (but not the server.ts!) looks different to a new Angular project with SSR.What is the use-case or motivation for changing an existing behavior?
Environment:
@nguniversal versions
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: