我已按照Tower.js 的安装说明进行操作,但在尝试启动服务器时出现错误。
TypeError: Cannot read property 'watchfile' of null
我的安装步骤是-
- 安装 node.js
- 安装 mongodb
- 安装 Ruby 和 Ruby 开发工具包。
- 安装 Tower.js-
sudo npm install design.io -g npm install tower -g
- 生成应用
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 的新手,并且在 Windows 7 64 位上。关于可能导致此错误的任何提示?