Skip to content

build --prod fail #7204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ziv opened this issue Jul 30, 2017 · 5 comments
Closed

build --prod fail #7204

ziv opened this issue Jul 30, 2017 · 5 comments

Comments

@ziv
Copy link

ziv commented Jul 30, 2017

Bug Report or Feature Request (mark with an x)

- [X] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.2.5
node: 8.1.4
os: linux x64
@angular/animations: 4.3.2
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.3.2
@angular/compiler: 4.3.2
@angular/core: 4.3.2
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.3.2
@angular/http: 4.3.2
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.2
@angular/platform-browser-dynamic: 4.3.2
@angular/router: 4.3.2
@angular/cli: 1.2.5
@angular/compiler-cli: 4.3.2
@angular/language-service: 4.3.2

npm version: 2.15.12

Repro steps.

ng build --prod

The log given by the failure.

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/home/ziv/code/binah/fec/src'
 @ ./src/main.ts 4:0-74
 @ multi ./src/main.ts

Desired functionality.

Build will pass

Mention any other details that might be useful.

ng serve works great

Full packages.json:

{
  "dependencies": {
    "@angular/animations": "^4.2.6",
    "@angular/cdk": "^2.0.0-beta.8",
    "@angular/common": "^4.0.0",
    "@angular/compiler": "^4.0.0",
    "@angular/core": "^4.0.0",
    "@angular/flex-layout": "^2.0.0-beta.8",
    "@angular/forms": "^4.0.0",
    "@angular/http": "^4.0.0",
    "@angular/material": "^2.0.0-beta.6",
    "@angular/platform-browser": "^4.0.0",
    "@angular/platform-browser-dynamic": "^4.0.0",
    "@angular/router": "^4.0.0",
    "@types/chart.js": "^2.6.1",
    "@types/uuid": "^3.4.0",
    "chart.js": "^2.6.0",
    "core-js": "^2.4.1",
    "global": "^4.3.2",
    "hammerjs": "^2.0.8",
    "ng2-charts": "^1.6.0",
    "pretty-bytes": "^4.0.2",
    "rxjs": "^5.4.1",
    "uuid": "^3.1.0",
    "zone.js": "^0.8.14"
  },
  "devDependencies": {
    "@angular/cli": "1.2.5",
    "@angular/compiler-cli": "^4.0.0",
    "@angular/language-service": "^4.0.0",
    "@types/jasmine": "~2.5.53",
    "@types/jasminewd2": "~2.0.2",
    "@types/node": "~6.0.60",
    "codelyzer": "~3.0.1",
    "enhanced-resolve": "3.3.0",
    "jasmine-core": "~2.6.2",
    "jasmine-spec-reporter": "~4.1.0",
    "karma": "~1.7.0",
    "karma-chrome-launcher": "~2.1.1",
    "karma-cli": "~1.0.1",
    "karma-coverage-istanbul-reporter": "^1.2.1",
    "karma-jasmine": "~1.1.0",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.1.2",
    "ts-node": "~3.0.4",
    "tslint": "~5.3.2",
    "typescript": "~2.3.3"
  }
}

@woppa684
Copy link

Upgrading to 1.2.6 should fix this issue, see #7113.

@ziv
Copy link
Author

ziv commented Jul 30, 2017

@woppa684 not working.
Upgraded cli to 1.2.6

@angular/cli: 1.2.6
node: 8.1.4
os: linux x64
@angular/animations: 4.3.2
@angular/cdk: 2.0.0-beta.8
@angular/common: 4.3.2
@angular/compiler: 4.3.2
@angular/core: 4.3.2
@angular/flex-layout: 2.0.0-rc.1
@angular/forms: 4.3.2
@angular/http: 4.3.2
@angular/material: 2.0.0-beta.8
@angular/platform-browser: 4.3.2
@angular/platform-browser-dynamic: 4.3.2
@angular/router: 4.3.2
@angular/cli: 1.2.6
@angular/compiler-cli: 4.3.2
@angular/language-service: 4.3.2

Now I get this error:

ERROR in vendor.a83297de985f29b65505.bundle.js from UglifyJs
Unexpected token: operator (>) [vendor.a83297de985f29b65505.bundle.js:37493,22]

@woppa684
Copy link

Yes, but that's a different thing, something like #5362.

@filipesilva
Copy link
Contributor

Closing as answered by @woppa684, thank you 👍

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants