angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

yarn fails to handle angular-cli 1.2.4 dependencies correctly

Open rightisleft opened this issue 9 years ago • 26 comments

Bug Report or Feature Request (mark with an x)

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

Versions.

@angular/cli: 1.2.4 node: 6.11.1 os: linux x64 @angular/common: 4.3.1 @angular/compiler: 4.3.1 @angular/core: 4.3.1 @angular/forms: 4.3.1 @angular/http: 4.3.1 @angular/platform-browser: 4.3.1 @angular/platform-browser-dynamic: 4.3.1 @angular/router: 4.3.1 @angular/cli: 1.2.4 @angular/compiler-cli: 4.3.1

Repro steps.

package.json

...
  "private": true,
  "dependencies": {
    "@angular/common": "^4.3.1",
    "@angular/compiler": "^4.3.1",
    "@angular/core": "^4.3.1",
    "@angular/forms": "^4.3.1",
    "@angular/http": "^4.3.1",
    "@angular/platform-browser": "^4.3.1",
    "@angular/platform-browser-dynamic": "^4.3.1",
    "@angular/router": "^4.3.1",
    "@ng-bootstrap/ng-bootstrap": "^1.0.0-alpha.28",
    "@types/tinycolor": "^1.1.27",
    "angular2-loaders-css": "1.0.5",
    "cerialize": "0.1.13",
    "core-js": "^2.4.1",
    "msgpack-lite": "^0.1.26",
    "ng2-charts": "^1.6.0",
    "ng2-page-scroll": "^4.0.0-beta.3",
    "ng2-select": "^1.2.0",
    "ng2-toasty": "4.0.0",
    "puse-icons-feather": "^1.1.0",
    "reflect-metadata": "0.1.9",
    "rxjs": "^5.1.0",
    "tinycolor2": "^1.4.1",
    "ts-helpers": "1.1.1",
    "typeorm": "0.0.9",
    "typescript": "^2.2.0",
    "zone.js": "^0.7.6"
  },
  "devDependencies": {
    "@angular/cli": "^1.2.4",
    "@angular/compiler-cli": "^4.3.1",
    "@types/jasmine": "2.5.38",
    "@types/node": "6.0.42",
    "bootstrap": "4.0.0-alpha.6",
    "codelyzer": "~2.0.0-beta.1",
    "font-awesome": "4.7.0",
    "jasmine-core": "2.5.2",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "1.2.0",
    "karma-chrome-launcher": "2.0.0",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.0.2",
    "karma-remap-istanbul": "0.2.1",
    "protractor": "~4.0.13",
    "ts-node": "2.1.0",
    "tslint": "4.3.0"
  }
}

$ yarn list enhanced-resolve                                                                                                                                                                                                                                                           yarn list v0.24.6
└─ [email protected]

`$ng build --prod `

The log given by the failure.

[root@4bc7c5f8560c PiensoWeb]# ng build --prod
Hash: 381eeb7f2d84ab2dfd29
Time: 19189ms
chunk    {0} styles.ff557a508943300e7e5d.bundle.css (styles) 440 bytes {4} [initial] [rendered]
chunk    {1} main.c242e4a20e66c8a77083.bundle.js (main) 1.76 kB {3} [initial] [rendered]
chunk    {2} scripts.2264c5f19ef83b4b557f.bundle.js (scripts) 152 kB {4} [initial] [rendered]
chunk    {3} vendor.89b6466bbf579cad9ebd.bundle.js (vendor) 1.08 MB [initial] [rendered]
chunk    {4} inline.33937348cd092eeba28e.bundle.js (inline) 0 bytes [entry] [rendered]

ERROR in ./src/main.ts
Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in '/godata/pipelines/PiensoWeb/src'
 @ ./src/main.ts 4:0-74
 @ multi ./src/main.ts

Desired functionality.

When i run this on OS X it works fine.

$ng -v                                                                                                                                                                                                                                                                                        
@angular/cli: 1.2.4
node: 6.11.0
os: darwin x64
@angular/common: 4.3.1
@angular/compiler: 4.3.1
@angular/core: 4.3.1
@angular/forms: 4.3.1
@angular/http: 4.3.1
@angular/platform-browser: 4.3.1
@angular/platform-browser-dynamic: 4.3.1
@angular/router: 4.3.1
@angular/cli: 1.2.4
@angular/compiler-cli: 4.3.1

$ng build --prod                                                                                                                                                                                                                                                                          
Hash: 3b14b67673dd8ca9ba26
Time: 41531ms
chunk    {0} main.8683891522fecb4ec38d.bundle.js (main) 591 kB {3} [initial] [rendered]
chunk    {1} styles.ff557a508943300e7e5d.bundle.css (styles) 440 bytes {4} [initial] [rendered]
chunk    {2} scripts.9a8757e99ae6e1dcb456.bundle.js (scripts) 152 kB {4} [initial] [rendered]
chunk    {3} vendor.c61629386e8e347207a2.bundle.js (vendor) 4.9 MB [initial] [rendered]
chunk    {4} inline.25beaa585d007a77a7d7.bundle.js (inline) 0 bytes [entry] [rendered]

Mention any other details that might be useful.

Yarn packages && node_modules deleted and reinstall on each linux build

rightisleft avatar Jul 25 '17 15:07 rightisleft

Works for me.

Big Thanks @filipesilva !!!

cebor avatar Jul 27 '17 19:07 cebor

Can confirm, 1.2.5 was broken, 1.2.6 works fine for me.

rybaczewa avatar Jul 28 '17 14:07 rybaczewa

@angular/cli 1.2.6 working like a charm. Thanks!

orestes avatar Jul 28 '17 16:07 orestes

Closing then, this seems to be sorted.

filipesilva avatar Jul 29 '17 09:07 filipesilva

@filipesilva I think you accidentally opened the issue again. It works like a charm for me now as well with yarn 0.27.5

BorntraegerMarc avatar Jul 29 '17 11:07 BorntraegerMarc

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.