2016-03-31 15 views
0

Gruntfile.js verbinden Stück:Livereload.js nicht geladen, Adresse ungültig

connect: { 
    options: { 
    port: 4000, 
    // Change this to '0.0.0.0' to access the server from outside. 
    hostname: 'localhost', 
    livereload: 4002 
    }, 
    livereload: { 
    options: { 
     open: true, 
     middleware: function (connect) { 
     return [ 
      connect.static('.tmp'), 
      connect().use(
      '/bower_components', 
      connect.static('./bower_components') 
     ), 
      connect().use(
      '/app/styles', 
      connect.static('./app/styles') 
     ), 
      connect.static(appConfig.app) 
     ]; 
     } 
    } 
    } 

Package.json (NPM):

{ 
    "name": "ukrbook", 
    "version": "0.0.0", 
    "license": "MIT", 
    "description": "text", 
    "dependencies": { 
    "chokidar": "^1.4.3", 
    "grunt-contrib-imagemin": "^1.0.0", 
    "livereload-js": "^2.2.2" 
    }, 
    "repository": {}, 
    "devDependencies": { 
    "connect-livereload": "^0.5.4", 
    "grunt": "^0.4.5", 
    "grunt-autoprefixer": "^3.0.4", 
    "grunt-concurrent": "^2.2.1", 
    "grunt-contrib-clean": "^1.0.0", 
    "grunt-contrib-concat": "^1.0.0", 
    "grunt-contrib-connect": "^1.0.1", 
    "grunt-contrib-copy": "^1.0.0", 
    "grunt-contrib-cssmin": "^1.0.1", 
    "grunt-contrib-htmlmin": "^1.1.0", 
    "grunt-contrib-imagemin": "^1.0.0", 
    "grunt-contrib-jshint": "^1.0.0", 
    "grunt-contrib-uglify": "^1.0.1", 
    "grunt-contrib-watch": "^1.0.0", 
    "grunt-filerev": "^2.1.2", 
    "grunt-google-cdn": "^0.4.3", 
    "grunt-karma": "^0.12.2", 
    "grunt-newer": "^1.1.0", 
    "grunt-ng-annotate": "^2.0.1", 
    "grunt-svgmin": "^3.1.2", 
    "grunt-usemin": "^3.0.0", 
    "grunt-wiredep": "^2.0.0", 
    "jasmine-core": "^2.2.0", 
    "jshint-stylish": "^2.1.0", 
    "karma": "^0.13.22", 
    "karma-jasmine": "^0.3.5", 
    "karma-phantomjs-launcher": "^1.0.0", 
    "load-grunt-tasks": "^3.1.0", 
    "serve-static": "^1.10.2", 
    "time-grunt": "^1.0.0" 
    }, 
    "engines": { 
    "node": ">=0.10.0" 
    }, 
    "scripts": { 
    "test": "grunt test" 
    } 
} 

Das Problem irgendwie livereload ist will nicht laden . Es gibt mir einen Konsolenfehler. Es wird angezeigt, als ich 'grunt serve' starte und die Seite neu lade: enter image description here Ich habe viele Sachen ausprobiert, Hostnamen geändert, Liveload, einige Parameter, Neuinstallation von Liveload, aber ich kann es einfach nicht bekommen. Was ist das Problem? Es sieht es dort einfach nicht. enter image description here

Antwort