0

不知道为什么我在运行这个监视任务时不断收到这些错误。

咕噜监视任务

# Watch task
watch:
 options:
  nospawn: true
  livereload: true
 server_coffee:
  files: ['server/**/*.coffee']
  tasks: ['coffee:changed']
 server_copy:
  files: ['server/**/*.!(coffee)']
  tasks: ['copy:changed']
 client_coffee:
  files: ['client/**/*.coffee']
  tasks: ['coffee:changed']
 client_copy:
  files: ['client/**/*.!(coffee)']
  tasks: ['copy:changed']

咕噜声事件

# Watch changed files
grunt.event.on 'watch', (action, filepath) ->

 # Determine server or client folder
 path = if filepath.indexOf('client') isnt -1 then 'client' else 'server'
 cwd = "#{path}/"
 filepath = filepath.replace(cwd,'')        

 # Minimatch for coffee files
 if minimatch filepath, '**/*.coffee'
  # Compile changed file
  grunt.config.set('coffee',
   changed:
    expand: true
    cwd: cwd
    src: filepath
    dest: "#{path}-dist/"
    ext: '.js'
  ) 

 # Minimatch for all others
 if minimatch filepath, '**/*.!(coffee)'
  # Copy changed file
  grunt.config.set('copy',
   changed:
     files: [
      expand: true
      cwd: cwd
      src: filepath
      dest: "#{path}-dist/"
     ]
  )

笔记

  • 偶尔发生

错误

这些错误中的任何一个。

node(11548,0x7fff70ce7cc0) malloc: *** error for object 0x100c329c8: incorrect checksum for freed object - object was probably modified after being freed.
*** set a breakpoint in malloc_error_break to debug
[1]    11548 abort      grunt build

Assertion failed: (("libev: ev_io_stop called with illegal fd (must stay constant after start!)", w->fd >= 0 && w->fd < anfdmax)), function ev_io_stop, file     ../deps/uv/src/unix/ev/ev.c, line 2699.
[1]    11930 abort      grunt build

node(11189,0x7fff70ce7cc0) malloc: *** error for object 0x100a35f68: pointer being freed  was not allocated
*** set a breakpoint in malloc_error_break to debug
[1]    11189 abort      grunt build

[1]    11479 segmentation fault  grunt build
4

0 回答 0