意外的严格模式保留字“让”

时间:2014-06-19 12:54:34

标签: javascript node.js

我收到此错误:

  

意外的严格模式保留字

当我尝试运行此代码时:

"use strict";
var
fs = require('fs'),
spawn = require('child_process').spawn,
filename = process.argv[2];

if(!filename){
  throw Error('A File to watch must be specified!');
}
fs.watch(filename,function(){
    let ls = spawn('ls',['-lh',filename]);
    ls.stdout.pipe(process.stdout);
});
console.log("now watching " + filename + " for changes.....");

0 个答案:

没有答案
相关问题