2017-05-18 5 views
0

나는 내 자신의 gruntfile을 만들고 내가 원하는 다양한 작업을 추가하는 방법에 대해 배우는 후반부를 보냈습니다. 지금까지 모든 것이 잘 진행되었지만, 나는 라이브 재로드 기능을 grunt-contrib-watch에 추가하고 몇 가지 문제를 겪고 있습니다.그란트 라이브로드 치명적인 오류 : 듣기 EACCES

내 로컬 호스트 그래서 난이 나을 생각 문서 https://github.com/gruntjs/grunt-contrib-watch#optionslivereload

을 통해 읽은 후 포트 9080을 듣고있다?

module.exports = function(grunt) { 
 
require('jit-grunt')(grunt); 
 
    grunt.initConfig({ 
 
    pkg: grunt.file.readJSON('package.json'), 
 
    concat: { 
 
     options: { 
 
     separator: ';' 
 
     }, 
 
     dist: { 
 
     src: ['*.js', 'scripts/**/*.js'], 
 
     dest: 'dist/<%= pkg.name %>.js' 
 
     } 
 
    }, 
 
    uglify: { 
 
     options: { 
 
     banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' 
 
     }, 
 
     dist: { 
 
     files: { 
 
      'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] 
 
     } 
 
     } 
 
    }, 
 
    jshint: { 
 
     files: ['gruntfile.js', '*.js', 'scripts/**/*.js'], 
 
     options: { 
 
     // options here to override JSHint defaults 
 
     globals: { 
 
      jQuery: true, 
 
      console: true, 
 
      module: true, 
 
      document: true 
 
     } 
 
     } 
 
    }, 
 
    less: { 
 
     development: { 
 
     options: { 
 
      compress: true, 
 
      yuicompress: true, 
 
      optimization: 2 
 
     }, 
 
     files: { 
 
      "css/main.css": "less/*.less" // destination file and source file 
 
     } 
 
     } 
 
    }, 
 
    watch: { 
 
     files: ['<%= jshint.files %>', 'less/**/*.less', '*.html', 'templates/**/*.html', 'data/**/*.json'], 
 
     tasks: ['jshint', 'less'], 
 
     options: { 
 
     livereload: { 
 
      host: 'localhost', 
 
      port: 9080 
 
     } 
 
     } 
 
    }, 
 
    }); 
 

 
    grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'less', 'watch']); 
 

 
};

나는

은 ... 작업 대기 "를보고"실행 ... 나는 시계 설정을 다시로드

을 저장하려고 할 때마다이 오류를 받고 있어요 치명적인 오류 : EACCES 수신 127.0.0.1:9080

이것에 불을 붙 였나요?

감사

+0

이 오류의 전체 로그를 게시 할 수 있습니까? 'EACCESS'는 그리 많이 들지 않습니다. – Joseph

+0

그게 전부 오류입니다, 나는 아무것도 생략하지 않았습니다. – pragmatic84

답변

0

오류가 WAMPServer에 의해 발생되고 있었다, 그 시계가 자신의 로컬 호스트를 생성 몰랐어요.

이제 화면에 내 사이트를 표시하는 방법을 알아 내려고 노력했습니다.

순간에 표시되는 사용자들은 모든

{ "tinylr는": "에 오신 것을 환영합니다", "버전": "0.2.1"}입니다