为什么我得到ENOENT?

时间:2015-12-23 23:20:55

标签: javascript node.js

文件target.txtwatcher.js位于同一目录nodeex中。什么是不正确的?

node --harmony nodeex/watcher.js

这是文件watcher.js

const fs = require('fs');
fs.watch('target.txt', function() {
  console.log("File 'target.txt' just changed!");
});
console.log("Now watching target.txt for changes...");

1 个答案:

答案 0 :(得分:0)

String.metaClass.bark = { -> println "WOOF!" }

您输入的命令确定始终独立于您的节点文件的解决方案是添加文件的绝对路径

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  white-space:nowrap;
  overflow-x:auto;
}

#wrapper {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  white-space: nowrap;
  overflow-x: scroll;
}

.a,
.b {
  display:inline-block;
  width: 100%;
  height: 100%;
  vertical-align: top;
  background-size: 100% 100%;
  background-repeat: no-repeat;
}

.a {
  background-image: url(http://i66.tinypic.com/2wqv7fd.jpg);
}

.b {
  background-image: url(http://i67.tinypic.com/2lborxv.jpg);
}