Windows 7上的Tower.js:无法读取null的属性watchfile

时间:2012-07-18 04:41:27

标签: node.js towerjs

我已关注installation instructions for Tower.js,当我尝试启动服务器时收到错误。

TypeError: Cannot read property 'watchfile' of null

我的安装步骤是 -

  1. 安装node.js
  2. 安装mongodb
  3. 安装Ruby和Ruby开发工具包。
  4. 安装Tower.js -
  5. sudo npm install design.io -g
    npm install tower -g
    
    1. 生成应用
    2. tower new app
      cd app
      sudo npm install
      tower generate scaffold Post title:string body:text
      npm test
      node server
      

      我在npm test -

      上收到错误消息
      > ./node_modules/mocha/bin/mocha $(find test -name "*Test.coffee")
      
      '.' is not recognized as an internal or external command,
      operable program or batch file.
      npm ERR! Test failed.  See above for more details.
      npm ERR! not ok code 0
      

      运行节点服务器,服务器启动,但会出现连续错误

      c:\Projects\MyProject\node_modules\design.io\lib\design.io\extensions\watchfile.js:7
          return project.createWatcher(project.watchfile, {
                                              ^
      TypeError: Cannot read property 'watchfile' of null
          at Object.module.exports (c:\Projects\MyProject\node_modules\design.io\lib\design.io\extensions\watch
      ile.js:7:41)
          at Object.module.exports.extension (c:\Projects\MyProject\node_modules\design.io\lib\design.io.js:11:
      6)
          at Object.<anonymous> (.:14:22)
          at Module._compile (module.js:449:26)
          at Object.Project.read (c:\Projects\MyProject\node_modules\design.io\lib\design.io\project.js:168:22)
          at Object.module.exports.coffee (c:\Projects\MyProject\node_modules\mint\mint.js:187:18)
          at Project.read (c:\Projects\MyProject\node_modules\design.io\lib\design.io\project.js:167:21)
          at fs.readFile (fs.js:176:14)
          at fs.close (c:\Projects\MyProject\node_modules\design.io\node_modules\hook.io\node_modules\npm\node_
      odules\graceful-fs\graceful-fs.js:94:5)
          at Object.oncomplete (fs.js:297:15)
      Forever detected script exited with code: 1
      Forever restarting script for 1 time
      

      我是Node.js的新手,也是64位Windows 7的新手。关于可能导致此错误的任何提示?

0 个答案:

没有答案