angular-cli: Angular univeral - problem with server.ts

Versions

Angular CLI: 1.6.1
Node: 6.9.5
OS: win32 x64
Angular: 5.1.1
... animations, common, compiler, compiler-cli, core, forms
... http, platform-browser, platform-browser-dynamic
... platform-server, router

@angular/cli: 1.6.1
@angular/language-service: 4.3.6
@angular-devkit/build-optimizer: 0.0.36
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.42
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.1
@schematics/angular: 0.1.11
@schematics/schematics: 0.0.11
typescript: 2.6.2
webpack: 3.10.0

I have tried to get angular unversal to work, but im getting this error ERROR in ./server.ts Module not found: Error: Can’t resolve ‘./dist/server/main.bundle’ in ’ @ ./server.ts 16:9-45

I have followed the guid here : https://angular.io/guide/universal#app-server-module

Any ides on what can be the problem?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (1 by maintainers)

Most upvoted comments

@mohammedzamakhan ng build --prod --output-hashing=false for the Universal app

@Tallyb sadly it did not work with cli 1.6.0 either, same error 😕