所以我用 git 来克隆 Twitter Bootstrap。然后我得到了 node.js 和 npm,因为我按照这里的说明进行操作:https ://github.com/twbs/bootstrap 然后我运行了命令npm install recess connect uglify-js jshint -g
。然后我还以相同的方式安装了 phantomjs(首先没有-g
标志,然后有它)。现在我应该能够运行make
然后make test
。 make
对我来说工作得很好,但make test
抛出以下错误:
jshint js/*.js --config js/.jshintrc
jshint js/tests/unit/*.js --config js/.jshintrc
node js/tests/server.js &
phantomjs js/tests/phantom.js "http://localhost:3000/js/tests"
module.js:340
throw err;
^
Error: Cannot find module 'connect'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:362:17)
at require (module.js:378:17)
at Object.<anonymous> (/Users/Jon/dev/blossom/bootstrap/js/tests/server.js:6:15)
at Module._compile (module.js:449:26)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.runMain (module.js:492:10)
Unable to access network
kill -9 `cat js/tests/pid.txt`
cat: js/tests/pid.txt: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
make: *** [test] Error 1