angular-cli: --build-optimizer giving 'browser' doesn't contain a valid alias configuration error

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting

Versions.

@angular/cli: 1.3.0-rc.0 node: 6.10.3 os: darwin x64 @angular/animations: 4.1.2 @angular/common: 4.1.2 @angular/compiler: 4.1.2 @angular/core: 4.1.2 @angular/forms: 4.1.2 @angular/http: 4.1.2 @angular/platform-browser: 4.1.2 @angular/platform-browser-dynamic: 4.1.2 @angular/router: 4.1.2 @angular/cli: 1.3.0-rc.0 @angular/compiler-cli: 4.1.2

Repro steps.

Not able to reproduce. Gives error on ng build --prod --build-optimizer

The log given by the failure.

Field 'browser' doesn't contain a valid alias configuration
/Users/gauravmukherjee/website/dashboard/v3/client/node_modules/tslib.js doesn't exist
as directory

Desired functionality.

ng build --prod --build-optimizer should work

Mention any other details that might be useful.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 8
  • Comments: 23 (9 by maintainers)

Most upvoted comments

I am also experience same issue that “ngfactory not found” and “Field ‘browser’ doesn’t contain a valid alias configuration”