Skip to content

Problem with zone.js and angular2-polyfills.js #7818

@stojankukrika

Description

@stojankukrika

Hello, I follow this tutorial

https://www.codetutorial.io/laravel-5-and-angular-2-beta-setup/

and this

https://laracasts.com/discuss/channels/laravel/angular2-laravel-hello-world-app

But I get that error:

Error: @http://localhost/naturedev/public/js/app.js:40:1
@http://localhost/naturedev/public/js/app.js:1:1
Zone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:332:20
Zone</Zone</Zone.prototype.run@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:227:25
scheduleResolveOrReject/<@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:576:53
Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:365:24
Zone</Zone</Zone.prototype.runTask@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:263:29
drainMicroTaskQueue@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:482:26
ZoneTask/this.invoke@http://localhost/naturedev/public/js/angular2/bundles/angular2-polyfills.js:434:22

Evaluating http://localhost/naturedev/public/js/app.js
Error loading http://localhost/naturedev/public/js/app.js
var newErr = new Error(newMsg, err.fileName, err.lineNumber);

This is how my gulp file look like:

var gulp = require("gulp");
var bower = require("gulp-bower");
var elixir = require("laravel-elixir");
var elixirTypscript = require('elixir-typescript');
elixir(function (mix) \{
   mix.copy('node_modules/angular2', 'public/js/angular2');
   mix.copy('node_modules/rxjs', 'public/js/rxjs');
   mix.copy('node_modules/systemjs', 'public/js/systemjs');
   mix.copy('node_modules/es6-promise', 'public/js/es6-promise');
   mix.copy('node_modules/es6-shim', 'public/js/es6-shim');
   mix.copy('node_modules/zone.js/dist', 'public/js/zone.js/dist');
   mix.typescript(
    [
        'app.component.ts',
        'boot.ts'
    ],
    'public/js',
    {
        "target": "es5",
        "module": "system",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false
    }
);
});

Full code is just published here.

Can anybody help me?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions