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

rc6 update

Open nkmdev opened this issue 10 years ago • 62 comments

Hi guys, when we can get rc6 generated project currently it generate rc4 which is quite old.

nkmdev avatar Sep 01 '16 13:09 nkmdev

RC.6 has been released just a day ago, so next release of angular-cli after that will support RC.6. BTW update to the latest version 1.0.0-beta.11-webpack.8 which supports RC.5

neilhem avatar Sep 01 '16 13:09 neilhem

but rc6 is out there but it generate rc4

nkmdev avatar Sep 01 '16 13:09 nkmdev

rc.6 arrived less than 24 hours ago... the CLI team works fast but they must occasionally eat and sleep. :-)

kylecordes avatar Sep 01 '16 14:09 kylecordes

system-config.js in quickstart is changed completely for barrels, so the app breaks if we use angular-cli, even if there is no new release asap, a fix should be posted.

ng2 barrels have been changed and do not work with cli barrels.

zone.js:101 GET http://localhost:4200/traceur 404 (Not Found)scheduleTask @ zone.js:101ZoneDelegate.scheduleTask @ zone.js:345Zone.scheduleMacroTask @ zone.js:282(anonymous function) @ zone.js:122send @ VM1558:3fetchTextFromURL @ system.src.js:1156(anonymous function) @ system.src.js:1739ZoneAwarePromise @ zone.js:607(anonymous function) @ system.src.js:1738(anonymous function) @ system.src.js:2764(anonymous function) @ system.src.js:3338(anonymous function) @ system.src.js:3605(anonymous function) @ system.src.js:3990(anonymous function) @ system.src.js:4453(anonymous function) @ system.src.js:4705(anonymous function) @ system.src.js:408ZoneDelegate.invoke @ zone.js:332Zone.run @ zone.js:225(anonymous function) @ zone.js:591ZoneDelegate.invokeTask @ zone.js:365Zone.runTask @ zone.js:265drainMicroTaskQueue @ zone.js:497ZoneTask.invoke @ zone.js:437
zone.js:484 Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost:4200/traceur
        at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:4200/vendor/zone.js/dist/zone.js:794:30)
        at ZoneDelegate.invokeTask (http://localhost:4200/vendor/zone.js/dist/zone.js:365:38)
        at Zone.runTask (http://localhost:4200/vendor/zone.js/dist/zone.js:265:48)
        at XMLHttpRequest.ZoneTask.invoke (http://localhost:4200/vendor/zone.js/dist/zone.js:433:34)
    Error loading http://localhost:4200/traceur
    Error loading http://localhost:4200/vendor/@angular/platform-browser-dynamic/index.js as "@angular/platform-browser-dynamic" from http://localhost:4200/main.js ; Zone: <root> ; Task: Promise.then ; Value: Error: 
Error: XHR error (404 Not Found) loading http://localhost:4200/traceur(…) nullconsoleError @ zone.js:484_loop_1 @ zone.js:511drainMicroTaskQueue @ zone.js:515ZoneTask.invoke @ zone.js:437
zone.js:486 Error: Uncaught (in promise): Error: Error: XHR error (404 Not Found) loading http://localhost:4200/traceur(…)consoleError @ zone.js:486_loop_1 @ zone.js:511drainMicroTaskQueue @ zone.js:515ZoneTask.invoke @ zone.js:437
263system.src.js:373 Assertion failed: loading or loaded

sprypradeep avatar Sep 01 '16 15:09 sprypradeep

Same issue here. A first investigation of the problem results in that several *.js files in /dist/vendor/@angular contains ES6 syntax. Hence SystemJS tries to load traceur to be able to transpile it.

jrauschenbusch avatar Sep 01 '16 15:09 jrauschenbusch

FYI: There's already a PR for this. I'm sure it will take the team some time to update everything and get tests passing again. Until then you should be using the RC that matches the version of angular-cli for your project.

JSMike avatar Sep 01 '16 15:09 JSMike

actually, i'm waiting for -mobile comeback. sorry for off topic.

ipoj avatar Sep 01 '16 15:09 ipoj

I thought the Angular team were really robots powered by Google AI. No need to eat or sleep!! :smile: :laughing: :laughing: :stuck_out_tongue_closed_eyes:

jwuliger avatar Sep 02 '16 16:09 jwuliger

let them eat and sleep 👍

moparlakci avatar Sep 03 '16 19:09 moparlakci

Why eat and sleep every day? Suggestion: you could sleep today and eat tomorrow.

oswaldofreitas avatar Sep 04 '16 23:09 oswaldofreitas

Hi all, i changed the system-config.ts like this :

***********************************************************************************************
 * User Configuration.
 **********************************************************************************************/
/** Map relative paths to URLs. */
const map: any = {};

/** User packages configuration. */
const packages: any = {
    'rxjs'                             : {main: 'Rx'},
        '@angular/core'                    : {main: 'bundles/core.umd.min.js'},
        '@angular/common'                  : {main: 'bundles/common.umd.min.js'},
        '@angular/compiler'                : {main: 'bundles/compiler.umd.min.js'},
        '@angular/platform-browser'        : {main: 'bundles/platform-browser.umd.min.js'},
        '@angular/platform-browser-dynamic': {main: 'bundles/platform-browser-dynamic.umd.min.js'},
        '@angular/http' : {main: 'bundles/http.umd.min.js'}
};

////////////////////////////////////////////////////////////////////////////////////////////////
/***********************************************************************************************
 * Everything underneath this line is managed by the CLI.
 **********************************************************************************************/
const barrels: string[] = [

  // App specific barrels.
  /** @cli-barrel */
];

const cliSystemConfigPackages: any = {};
barrels.forEach((barrelName: string) => {
    cliSystemConfigPackages[barrelName] = {main: 'index'};
});

/** Type declaration for ambient System. */
declare var System: any;

// Apply the CLI SystemJS configuration.
System.config({
  map: {'@angular': 'vendor/@angular', 'rxjs': 'vendor/rxjs', 'main': 'main.js'},
  packages: cliSystemConfigPackages
});
//
// Apply the user's configuration.
System.config({map, packages});

I give you my package configuration too :

"dependencies": {
    "@angular/common": "2.0.0-rc.6",
    "@angular/compiler": "2.0.0-rc.6",
    "@angular/core": "2.0.0-rc.6",
    "@angular/http": "2.0.0-rc.6",
    "@angular/platform-browser": "2.0.0-rc.6",
    "@angular/platform-browser-dynamic": "2.0.0-rc.6",
    "@angular/router": "3.0.0-rc.2",
    "es6-shim": "0.35.1",
    "reflect-metadata": "0.1.3",
    "rxjs": "5.0.0-beta.11",
    "systemjs": "0.19.26",
    "zone.js": "0.6.17"
  },
  "devDependencies": {
    "angular-cli": "1.0.0-beta.10",
    "codelyzer": "0.0.19",
    "ember-cli-inject-live-reload": "1.4.0",
    "protractor": "3.3.0",
    "ts-node": "1.2.1",
    "tslint": "3.13.0",
    "typescript": "2.0.0"
  }

choucry13 avatar Sep 05 '16 11:09 choucry13

I was able to build with angular cli after upgrade to rc6 by adding 'typescript/*/.+(js|js.map)' to the vendorNpmFiles array in the angular-cli-build.js.

And changing sytem.config.ts to: "use strict";

// SystemJS configuration file, see links for more information // https://github.com/systemjs/systemjs // https://github.com/systemjs/systemjs/blob/master/docs/config-api.md

/***********************************************************************************************

  • User Configuration. *********************************************************************************************/ /* Map relative paths to URLs. */ const map: any = { 'ng2-pagination': 'vendor/ng2-pagination' };

/** User packages configuration. */ const packages: any = { };

packages['ng2-pagination'] = { format: 'cjs', defaultExtension: 'js', main: 'index', };

//////////////////////////////////////////////////////////////////////////////////////////////// /***********************************************************************************************

  • Everything underneath this line is managed by the CLI. *********************************************************************************************/ const barrels: string[] = [ // Angular specific barrels. '@angular/core', '@angular/common', '@angular/compiler', '@angular/forms', '@angular/http', '@angular/router', '@angular/platform-browser', '@angular/platform-browser-dynamic', // Thirdparty barrels. 'rxjs', // 'ng2-pagination', // App specific barrels. 'app', 'app/shared', 'app/login', 'app/inicio', 'app/moviles', 'app/componentes/select-enumeracion', 'app/guias', 'app/idiomas', /* @cli-barrel */ ];

const cliSystemConfigPackages: any = { 'vendor/ng2-bootstrap': { defaultExtension: 'js',
} }; barrels.forEach((barrelName: string) => { cliSystemConfigPackages[barrelName] = { main: 'index.js' }; //add extension });

/** Type declaration for ambient System. */ declare var System: any;

// Apply the CLI SystemJS configuration. System.config({ transpiler: 'typescript', //add transpiler map: { '@angular': 'vendor/@angular', 'rxjs': 'vendor/rxjs', 'main': 'main.js', 'angular2-moment': 'vendor/angular2-moment', 'ng2-bootstrap': 'vendor/ng2-bootstrap', 'ng2-pagination': 'vendor/ng2-pagination', 'typescript': 'vendor/typescript/lib/typescript.js' //add typescript map }, packages: cliSystemConfigPackages });

// Apply the user's configuration. System.config({ map, packages });

Juliete avatar Sep 05 '16 11:09 Juliete

Hi Guys, Any update on this?

khanujasunny avatar Sep 07 '16 08:09 khanujasunny

And, maybe a dumb question, but can we use AOT with Angular CLI?

ghost avatar Sep 07 '16 09:09 ghost

@rolandoldengarm : Why you think its a dumb question ?

khanujasunny avatar Sep 07 '16 09:09 khanujasunny

@khanujasunny maybe I missed something, but I don't think it's a feature of Angular CLI.

ghost avatar Sep 07 '16 20:09 ghost

@rolandoldengarm : Which feature ?

khanujasunny avatar Sep 07 '16 20:09 khanujasunny

Ah, there's already an issue for that: https://github.com/angular/angular-cli/issues/1732

ghost avatar Sep 07 '16 20:09 ghost

it seems that question is not for AoT compilation but for rc6 update in angular-cli ;)

khanujasunny avatar Sep 07 '16 20:09 khanujasunny

Angular cli update on RC6?

karthikkavin avatar Sep 08 '16 09:09 karthikkavin