Skip to content
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

rc6 update #1938

Closed
nkmdev opened this issue Sep 1, 2016 · 62 comments
Closed

rc6 update #1938

nkmdev opened this issue Sep 1, 2016 · 62 comments

Comments

@nkmdev
Copy link

nkmdev commented Sep 1, 2016

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

@neilhem
Copy link
Contributor

neilhem commented Sep 1, 2016

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

@nkmdev
Copy link
Author

nkmdev commented Sep 1, 2016

but rc6 is out there but it generate rc4

@kylecordes
Copy link

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

@sprypradeep
Copy link

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

@jrauschenbusch
Copy link

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.

@JSMike
Copy link
Contributor

JSMike commented Sep 1, 2016

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.

@ipoj
Copy link

ipoj commented Sep 1, 2016

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

@jwuliger
Copy link

jwuliger commented Sep 2, 2016

I thought the Angular team were really robots powered by Google AI. No need to eat or sleep!! 😄 😆 😆 😝

@moparlakci
Copy link

let them eat and sleep 👍

@oswaldofreitas
Copy link

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

@choucry13
Copy link

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"
  }

@Juliete
Copy link

Juliete commented Sep 5, 2016

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 });

@khanujasunny
Copy link

Hi Guys,
Any update on this?

@ghost
Copy link

ghost commented Sep 7, 2016

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

@khanujasunny
Copy link

@rolandoldengarm : Why you think its a dumb question ?

@ghost
Copy link

ghost commented Sep 7, 2016

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

@khanujasunny
Copy link

@rolandoldengarm : Which feature ?

@ghost
Copy link

ghost commented Sep 7, 2016

Ah, there's already an issue for that: #1732

@khanujasunny
Copy link

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

@karthikkavin
Copy link

Angular cli update on RC6?

@BenoitFroment
Copy link

Any process to manually update from angular-cli rc4 to rc6 ?

@vinagreti
Copy link

vinagreti commented Sep 8, 2016

I think you have to wait for RC6 support to be released. But you can get one step forward and transform all your components into modules that is the new way of organizing your app features in RC6. So, when ng-cli rc6 support become available you are ready to use it!

@BenoitFroment
Copy link

BenoitFroment commented Sep 8, 2016

My way to go (considering : https://angular.io/docs/ts/latest/cookbook/rc4-to-rc5.html) :
-Update package.json by rc4 to rc6 and TypeScript 1.8 to 2.0.0
-Create app.module.ts and update main.ts following : StephenFluin/ngmodule-migration@9f9c6ae
-Run : npm install @angular/{core,common,compiler,platform-browser,platform-browser-d ynamic} --save
-Run : npm install angular-cli @angular/tsc-wrapped --save-dev


Got this build error :

Error: Typescript found the following errors:
/tmp/broccoli_type_script_compiler-input_base_path-0wzn2lif.tmp/0/src/app/app.component.spec.ts (3, 10): Module '"/node_modules/@angular/core/testing/index"'has no exported member 'addProviders'.

@vinagreti
Copy link

vinagreti commented Sep 8, 2016

@Aorewen this is only the first error.. I've been there before... hehehe... When you fix this error removing addProviders from the test file you will end up in another error that is "cannot find traceur" and when you fiz it, you will end up in another one and so on.
Trust me, wait for the Angular cli RC6 support to be released is better then trying to update it by yourself.

@BenoitFroment
Copy link

Thanks, at least i'm not feeling alone. :)

@dekonunes
Copy link

I'll be necessary build a new app using Angular-cli RC6 and move the src to the new app? or i can update using comand to this? my error is "traceur.js 404", when updated RC6 from RC5

@ihachani
Copy link

ihachani commented Sep 8, 2016

Using webpack after upgrade the rc6 I was able to run ng serve.
But when I use ng test I get this error Uncaught Error: Missing: SyncTestZoneSpec .
Looking the error up someone suggested adding this to the karma shim require('zone.js/dist/proxy');
angular/zone.js#404
But there is no such file in the webpack cli project.

@moparlakci
Copy link

just clone the git repo and do npm link as decribed in the readme and you will get rc6 (latest) up and running

@some1awesome
Copy link

@ihachani Did you ever fix your problem? I'm getting the same issue.

@dekonunes
Copy link

@zackporter92 have 2 ways to solve this, depends of the way you are using angular, if you are using Angular-Cli:

Look the comment of @choucry13 upside.

If you are using systemjs.config.js of angular quickstart you need clone the new repo.

@kucharzyk
Copy link

Forget about rc6...

rc7 was published today

@vinagreti
Copy link

Should we expect that the AngularCli Team follow every RC or is better to wait the final release to start using it?
I'm still using RC5 because RC6 support was not released... My point is if it worth to work in every RC since it is changing so fast and the AngularCli Team cannot follow its speed.

@radoslavpetranov
Copy link

I was relieved to see there were practically no breaking changes in RC7!

@srivasrk
Copy link

RC7 change log looks pretty compact. Nothing major, and practically no breaking changes. I would not worry too much about RC7. Angular CLI however! idk.

@kucharzyk
Copy link

I'm also still using rc5 and waiting for next beta release.

In my opinion AngularCli team should try to follow each rc.
If ye are using cli we will skip rc6 but after next release there we may report lots of issues introduced in both rc6 and rc7. More frequent releases could avoid it and help eliminate some bugs. Cli could be better tested then.

@BenoitFroment
Copy link

BenoitFroment commented Sep 13, 2016

I found a way to start a new project using angular-cli with rc7:

-create a directory and go in
-run npm install angular-cli@webpack
-run ng new PROJECT_NAME
-run cd PROJECT_NAME
-open package.json : u're in rc5
-update package.json with these deps :

"dependencies": {
    "@angular/common": "2.0.0-rc.7",
    "@angular/compiler": "2.0.0-rc.7",
    "@angular/core": "2.0.0-rc.7",
    "@angular/forms": "2.0.0-rc.7",
    "@angular/http": "2.0.0-rc.7",
    "@angular/platform-browser": "2.0.0-rc.7",
    "@angular/platform-browser-dynamic": "2.0.0-rc.7",
    "@angular/router": "3.0.0-rc.3",
    "core-js": "^2.4.0",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "0.6.21"
  },
  "devDependencies": {
    "@types/jasmine": "^2.2.30",
    "angular-cli": "1.0.0-beta.11-webpack.8",
    "codelyzer": "~0.0.26",
    "jasmine-core": "2.4.1",
    "jasmine-spec-reporter": "2.5.0",
    "karma": "0.13.22",
    "karma-chrome-launcher": "0.2.3",
    "karma-jasmine": "0.3.8",
    "karma-remap-istanbul": "^0.2.1",
    "protractor": "4.0.3",
    "ts-node": "1.2.1",
    "tslint": "3.13.0",
    "typescript": "^2.0.0"
  }

-update tsconfig.json : "module": "commonjs",
-run npm install
-run ng serve

app works!

thanks @serhiisol for is help

@jwuliger
Copy link

Nice trick! If you are using NPM Link with the Master branch of the CLI. It looks like the team just updated it to RC7. Woot!

@radoslavpetranov
Copy link

Just a heads up for anyone subscribed to this thread - webpack.9 is up! Thank you ng CLI team!

'1.0.0-beta.11-webpack.9': '2016-09-13T20:02:08.970Z'

@jwuliger
Copy link

Awesome! Thanks CLI Team!

@radoslavpetranov
Copy link

Erm, after I took a second look, what does "experimental" mean in this context?

 { beta: '1.0.0-beta.10',
   latest: '1.0.0-beta.10',
   webpack: '1.0.0-beta.11-webpack.8',
   experimental: '1.0.0-beta.11-webpack.9' },

Is webpack.9 a logical continuation of the BETA process that takes us a step closer to RC or are we in for surprises should we decide to upgrade to webpack.9?

@jwuliger
Copy link

Hmmmm.... Very good question indeed @radoslavpetranov

@srivasrk
Copy link

I am waiting for "All hell broke loose" messages. I would be happy if I am wrong this time.

@jwuliger
Copy link

I am getting ready to test it out now...will let you know! haha

@radoslavpetranov
Copy link

radoslavpetranov commented Sep 13, 2016

I upgraded as well - everything seems to work fine in both dev and prod mode. To those of you who wonder, here are the dependency versions as of webpack.9

 "dependencies": {
    "@angular/common": "2.0.0-rc.7",
    "@angular/compiler": "2.0.0-rc.7",
    "@angular/core": "2.0.0-rc.7",
    "@angular/forms": "2.0.0-rc.7",
    "@angular/http": "2.0.0-rc.7",
    "@angular/platform-browser": "2.0.0-rc.7",
    "@angular/platform-browser-dynamic": "2.0.0-rc.7",
    "@angular/router": "3.0.0-rc.3",
    "core-js": "^2.4.1",
    "rxjs": "5.0.0-beta.12",
    "ts-helpers": "^1.1.1",
    "zone.js": "^0.6.21"

and typescript is now

"typescript": "2.0.2"

And again, thanks CLI team!

@ShadowManu
Copy link

Reconfirming that our team has updated the cli on a medium-sized app with same deps as @radoslavpetranov, working fine under angular-cli@1.0.0-beta.11-webpack.9-4 on npm to be precise.

Thanks CLI team!

@brendanalexdr
Copy link

after installing angular-cli@1.0.0-beta.11-webpack.9-4 and running 'ng serve' i get the following error:

Cannot find module 'process-nextick-args'

running 'npm install process-nextick-args' fixes it.

@meriturva
Copy link

Now with angular-cli: 1.0.0-beta.14 angular version used is 2.0 final!
So i think issue could be closed!

@radoslavpetranov
Copy link

Upgraded to beta.14 as well - all works in both dev and prod. Thanks CLI team for being awesome!

And +1 for closing this issue.

@khanujasunny
Copy link

Can anyone confirm me that which process worked to initialize a new cli project with rc7 ?

@neilhem
Copy link
Contributor

neilhem commented Sep 15, 2016

Works well with final version of angular 2

@khanujasunny
Copy link

Agree with @meriturva . angular-cli: 1.0.0-beta.14 works perfectly with final version of angular 2. We can close this issue now. :)

@vinagreti
Copy link

Everything looks fine now. Thanks!

@brendanalexdr
Copy link

What is the full npm install reference?

npm install -g angular-cli@1.0.0-beta.14-webpack.???????

@serhiisol
Copy link
Contributor

npm install angular-cli or more specifically npm install angular-cli@1.0.0-beta.14

@filipesilva
Copy link
Contributor

The latest versions of the CLI support final A2.

@ghost
Copy link

ghost commented Dec 9, 2016

Whats last version? Whats comman npm install angular-cli×××× I will use?

@neilhem
Copy link
Contributor

neilhem commented Dec 10, 2016

Use npm install angular-cli@latest

@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 6, 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