Skip to content

ng serve on second attempt : cliSystemConfigPackages is not defined #1496

Closed

Description

@raskyer

I'm on :
OS => Windows 7
ng => 1.0.0-beta.10
node => 4.4.4
os => win32 x64

So I follow this tutorial :
https://angular-maps.com/docs/getting-started.html

Couples minutes after doing : ng serve, everythings works pretty well and after doing a simple CSS change in app.component.css got a very strange error on the cliSystemConfigPackages.

Message in console:

@http://localhost:4200/system-config.js:41:5
    Call@http://localhost:4200/vendor/es6-shim/es6-shim.js:289:14
    forEach@http://localhost:4200/vendor/es6-shim/es6-shim.js:1295:14
    @http://localhost:4200/system-config.js:40:1
    Zone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:4200/vendor/zone.js/dist/zone.js:323:20
    Zone</Zone</Zone.prototype.run@http://localhost:4200/vendor/zone.js/dist/zone.js:216:25
    scheduleResolveOrReject/<@http://localhost:4200/vendor/zone.js/dist/zone.js:571:53
    Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:4200/vendor/zone.js/dist/zone.js:356:24
    Zone</Zone</Zone.prototype.runTask@http://localhost:4200/vendor/zone.js/dist/zone.js:256:29
    drainMicroTaskQueue@http://localhost:4200/vendor/zone.js/dist/zone.js:474:26
    ZoneTask/this.invoke@http://localhost:4200/vendor/zone.js/dist/zone.js:426:22
    EventListener.handleEvent*scheduleEventListener@http://localhost:4200/vendor/zone.js/dist/zone.js:838:13
    Zone</ZoneDelegate</ZoneDelegate.prototype.scheduleTask@http://localhost:4200/vendor/zone.js/dist/zone.js:336:22
    Zone</Zone</Zone.prototype.scheduleEventTask@http://localhost:4200/vendor/zone.js/dist/zone.js:276:21
    zoneAwareAddEventListener@http://localhost:4200/vendor/zone.js/dist/zone.js:889:6
    addEventListener@http://localhost:4200/vendor/zone.js/dist/zone.js line 982 > Function:1:43
    patchProperty/desc.set@http://localhost:4200/vendor/zone.js/dist/zone.js:774:14
    ZoneAwarePromise@http://localhost:4200/vendor/zone.js/dist/zone.js:584:30
    Zone</ZoneDelegate</ZoneDelegate.prototype.invoke@http://localhost:4200/vendor/zone.js/dist/zone.js:323:20
    Zone</Zone</Zone.prototype.run@http://localhost:4200/vendor/zone.js/dist/zone.js:216:25
    scheduleResolveOrReject/<@http://localhost:4200/vendor/zone.js/dist/zone.js:571:53
    Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask@http://localhost:4200/vendor/zone.js/dist/zone.js:356:24
    Zone</Zone</Zone.prototype.runTask@http://localhost:4200/vendor/zone.js/dist/zone.js:256:29
    drainMicroTaskQueue@http://localhost:4200/vendor/zone.js/dist/zone.js:474:26

    Evaluating http://localhost:4200/system-config.js
    Error loading http://localhost:4200/system-config.js

Stack

Zone</ZoneDelegate</ZoneDelegate.prototype.invoke()zone.js:323
Zone</Zone</Zone.prototype.run()zone.js:216
scheduleResolveOrReject/<()zone.js:571
Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask()zone.js:356
Zone</Zone</Zone.prototype.runTask()zone.js:256
drainMicroTaskQueue()zone.js:474
ZoneTask/this.invoke()zone.js:426
(Asynchrone : EventListener.handleEvent) scheduleEventListener()zone.js:838
Zone</ZoneDelegate</ZoneDelegate.prototype.scheduleTask()zone.js:336
Zone</Zone</Zone.prototype.scheduleEventTask()zone.js:276
zoneAwareAddEventListener()zone.js:889
addEventListener()   zone.js%20line%20982%20%3E%20Function:1
patchProperty/desc.set()   zone.js:774
bootstrap/fetchTextFromURL()   system.src.js:1115
bootstrap/</</<()   system.src.js:1735
ZoneAwarePromise()   zone.js:584
bootstrap/</<()   system.src.js:1734
bootstrap/</<()   system.src.js:2759
bootstrap/</<()   system.src.js:3333
bootstrap/</<()   system.src.js:3600
bootstrap/</<()   system.src.js:3985
bootstrap/</<()   system.src.js:4448
bootstrap/</<()   system.src.js:4700
proceedToFetch/<()   system.src.js:406
Zone</ZoneDelegate</ZoneDelegate.prototype.invoke()   zone.js:323
Zone</Zone</Zone.prototype.run()   zone.js:216
scheduleResolveOrReject/<()   zone.js:571
Zone</ZoneDelegate</ZoneDelegate.prototype.invokeTask()   zone.js:356
Zone</Zone</Zone.prototype.runTask()     zone.js:256
drainMicroTaskQueue()     zone.js:474

capture

Stop ng serve and restart it don't change anything, also I try to delete ./dist directory and restart ng serve, without success ...

Really don't know what to do here. Thanks !

Activity

  1. raskyer commented on Jul 29, 2016

    @raskyer
    Author

    I also can confirm that there's no link to the tutorial that I link here.

    When I delete all inputs of google map, remove, clean cache and reinstall angular cli.
    First run => everything is ok
    Second => Bug that I describe here

  2. filipesilva commented on Jul 29, 2016

    @filipesilva
    Contributor

    Hm... I've never seen this error but this here is telling:

        Evaluating http://localhost:4200/system-config.js
        Error loading http://localhost:4200/system-config.js
    

    Might be some kind of syntax error in that file?

  3. raskyer commented on Jul 29, 2016

    @raskyer
    Author

    Here is the file. Touch it to put google map in it and after I try to comment those lines after but with google map or without = same problem

    "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. */
    var map = {};
    /** User packages configuration. */
    var packages = {};
    ////////////////////////////////////////////////////////////////////////////////////////////////
    /***********************************************************************************************
     * Everything underneath this line is managed by the CLI.
     **********************************************************************************************/
    var barrels = [
        // 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',
        // App specific barrels.
        'app',
        'app/shared',
    ];
    var cliSystemConfigPackages = {};
    barrels.forEach(function (barrelName) {
        cliSystemConfigPackages[barrelName] = { main: 'index' };
    });
    // 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: map, packages: packages });
    //# sourceMappingURL=system-config.js.map
    
  4. raskyer commented on Jul 29, 2016

    @raskyer
    Author

    Ok maybe found the problem but it seems strange. When I remove :
    "use strict"; in the file it seems to work. Got to try with google map to see if it's linked.

  5. raskyer commented on Jul 29, 2016

    @raskyer
    Author

    So remove this inline make it works.
    It's very slow (on Firefox dev, google chrome is ok) ... maybe another problem but it works

    Okay try on Chrome and can confirm it's Firefox Dev problem. Sorry was thinking it was angular ... On chrome it's speed and works (same with "use strict";)

  6. filipesilva commented on Jul 29, 2016

    @filipesilva
    Contributor

    We just overhauled the build system to address speed and other concerns, see #1455. No release yet, but it's coming.

  7. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  8. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions