1
所以我用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
拋出以下錯誤:爲什麼當我嘗試構建Twitter Bootstrap時,「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
我遇到同樣的問題。 –