Skip to content

Error loading @angular/core #1969

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
yboujallab opened this issue Sep 4, 2016 · 11 comments
Closed

Error loading @angular/core #1969

yboujallab opened this issue Sep 4, 2016 · 11 comments

Comments

@yboujallab
Copy link

Please provide us with the following information:

  1. OS Mac OSX

  2. Versions.
    angular-cli: 1.0.0-beta.10
    node: 6.2.2
    os: darwin x64

  3. App generated with 1.0.0-beta.8 version and i'm trying to upgarde to beta-10

  4. By running ng serve i got :
    Unhandled Promise rejection: "(SystemJS) XHR error (404 Not Found) loading http://localhost:4200/traceur
    patchProperty/desc.set/wrapFn@http://localhost:4200/vendor/zone.js/dist/zone.js:794:27
    Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:4200/vendor/zone.js/dist/zone.js:365:24
    Zone</Zone</Zone.prototype.runTask@http://localhost:4200/vendor/zone.js/dist/zone.js:265:29
    ZoneTask/this.invoke@http://localhost:4200/vendor/zone.js/dist/zone.js:433:29

    Error loading http://localhost:4200/traceur
    Unable to load transpiler to transpile http://localhost:4200/vendor/@angular/core/index.js
    Error loading http://localhost:4200/vendor/@angular/core/index.js as "@angular/core" from http://localhost:4200/main.js" ; Zone: ;

  5. I also upgrade my app to angular rc6


Thanks! We'll be in touch soon.

@asadsahi
Copy link

asadsahi commented Sep 4, 2016

production build is erroring because of an undefined script
image

image

Upgraded to Angular 2 RC6 with following environment details:
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.3.1
os: win32 x64

@yboujallab
Copy link
Author

Thanks asadsahi.

Upgraded to
angular-cli: 1.0.0-beta.11-webpack.8
node: 6.4.0
os: darwin x64

and still got same error
Error: Uncaught (in promise): Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:4200/traceur
patchProperty/desc.set/wrapFn@http://localhost:4200/vendor/zone.js/dist/zone.js:794:27
Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:4200/vendor/zone.js/dist/zone.js:365:24
Zone</Zone</Zone.prototype.runTask@http://localhost:4200/vendor/zone.js/dist/zone.js:265:29
ZoneTask/this.invoke@http://localhost:4200/vendor/zone.js/dist/zone.js:433:29

Error loading http://localhost:4200/traceur
Unable to load transpiler to transpile http://localhost:4200/vendor/@angular/platform-browser-dynamic/index.js
Error loading http://localhost:4200/vendor/@angular/platform-browser-dynamic/index.js as "@angular/platform-browser-dynamic" from http://localhost:4200/main.js

Trace de la pile :
resolvePromise@http://localhost:4200/vendor/zone.js/dist/zone.js:558:32
resolvePromise@http://localhost:4200/vendor/zone.js/dist/zone.js:543:18
scheduleResolveOrReject/<@http://localhost:4200/vendor/zone.js/dist/zone.js:591:18
Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:4200/vendor/zone.js/dist/zone.js:365:24
Zone</Zone</Zone.prototype.runTask@http://localhost:4200/vendor/zone.js/dist/zone.js:265:29
drainMicroTaskQueue@http://localhost:4200/vendor/zone.js/dist/zone.js:497:26
ZoneTask/this.invoke@http://localhost:4200/vendor/zone.js/dist/zone.js:437:26

@stefanaerts
Copy link

i have the same problem

@stefanaerts
Copy link

i am trying this example:
https://github.com/manekinekko/angular2-firebase-authentication
in that example he uses a file /src/app/material.providers.ts
I keep getting MD_TOOLBAR_DIRECTIVES does not exist
Then i changed my package.json to all latest versions without an error or warning running npm install.
This is the layout of the updated package.json
{
"name": "angular2-firebase-auth",
"version": "0.0.0",
"license": "MIT",
"angular-cli": {},
"scripts": {
"start": "ng serve",
"postinstall": "typings install",
"lint": "tslint "src/*/.ts"",
"test": "ng test",
"pree2e": "webdriver-manager update",
"e2e": "protractor"
},
"private": true,
"dependencies": {
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/core": "2.0.0-rc.6",
"@angular/forms": "0.3.0",
"@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",
"@angular2-material/button": "^2.0.0-alpha.8-1",
"@angular2-material/card": "^2.0.0-alpha.8-1",
"@angular2-material/core": "^2.0.0-alpha.8-1",
"@angular2-material/toolbar": "^2.0.0-alpha.8-1",
"angularfire2": "^2.0.0-beta.3-pre2",
"es6-shim": "0.35.1",
"firebase": "3.3.0",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.11",
"systemjs": "0.19.37",
"zone.js": "0.6.17"
},
"devDependencies": {
"angular-cli": "1.0.0-beta.10",
"codelyzer": "0.0.28",
"ember-cli-inject-live-reload": "1.4.1",
"jasmine-core": "2.5.0",
"jasmine-spec-reporter": "2.7.0",
"karma": "1.2.0",
"karma-chrome-launcher": "2.0.0",
"karma-jasmine": "1.0.2",
"protractor": "4.0.4",
"ts-node": "1.3.0",
"tslint": "3.15.1",
"typescript": "1.8.10",
"typings": "1.3.3"
}
}

Then when i run ng serve i get the error in console:
image

The only change i did is in node_modules/angularfire2 package.json -> i changed
a dependency version "rxjs": "5.0.0-beta.11" it was 5.0.0-beta.06 originally

No errors when i run ng serve,but in console in browser the error i printed above

@alexcastillo
Copy link

+1

@dparish
Copy link

dparish commented Sep 6, 2016

I don't think this is an angular CLI issue. I got this problem when I upgraded to RC-6. Here's what I'm seeing:

zone.js:484 Unhandled Promise rejection: (SystemJS) XHR error (404 Not Found) loading http://localhost:9080/tasks/traceur Error: XHR error (404 Not Found) loading http://localhost:9080/tasks/traceur at XMLHttpRequest.wrapFn [as _onreadystatechange] (http://localhost:9080/tasks/js/third-party/zone.js/dist/zone.js:794:30) at ZoneDelegate.invokeTask (http://localhost:9080/tasks/js/third-party/zone.js/dist/zone.js:365:38) at Zone.runTask (http://localhost:9080/tasks/js/third-party/zone.js/dist/zone.js:265:48) at XMLHttpRequest.ZoneTask.invoke (http://localhost:9080/tasks/js/third-party/zone.js/dist/zone.js:433:34) Error loading http://localhost:9080/tasks/traceur Unable to load transpiler to transpile http://localhost:9080/tasks/js/third-party/@angular/http/index.js Error loading http://localhost:9080/tasks/js/third-party/@angular/http/index.js as "@angular/http" from http://localhost:9080/tasks/js/app/app.module.js ; Zone: <root> ; Task: Promise.then ; Value: Error: (SystemJS) XHR error (404 Not Found) loading http://localhost:9080/tasks/traceur(…) null

@dparish
Copy link

dparish commented Sep 6, 2016

Ah this is it:

https://github.com/angular/angular/blob/master/CHANGELOG.md#breaking-changes

It's the systemjs change recommended there....

@yboujallab
Copy link
Author

resolved, i changed the system-config.ts like

/** 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/forms' : {main: 'bundles/forms.umd.min.js'},
'@angular/router' : {main: 'bundles/router.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'},

};

@Memeplexx
Copy link

Memeplexx commented Sep 13, 2016

@yboujallab thanks your suggestion helped (at least for non-production builds). For production builds, I needed to add format: 'cjs' to each of those declarations.
i.e. '@angular/core' : {main: 'bundles/core.umd.min.js', format: 'cjs'},

@filipesilva
Copy link
Contributor

Glad you got it working. This shouldn't be needed anymore starting beta.14.

@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
clydin pushed a commit to clydin/angular-cli that referenced this issue Aug 29, 2023
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

7 participants