2013-01-10 33 views
0

我在我的windows 8機器上安裝了[email protected]。在此之後,我嘗試驗證安裝。我啓動了mongod服務器,塔式服務器,並在我的瀏覽器中調用了http://localhost:3000。我收到錯誤消息(在瀏覽器窗口和服務器日誌中): TypeError:Object Windows 8在Object.Tower.MiddlewareAgent [作爲句柄](C:\ Users \ Philipp \ Documents \ Scripts \ tower)上沒有方法「匹配」 \ Test \ test01 \ node_modules \ tower \ lib \ tower-middleware \ server \ agent.js:13:21) at next(C:\ Users \ Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ node_modules \ tower \ node.modules \ connect \ lib \ proto.js:199:15) at Object.handle(C:\ Users \ Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ app \ config \ server \ bootstrap.coffee:23:14 ) at next(C:\ Users \ Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ node_modules \ tower \ node_modules \ connect \ lib \ proto.js:199:15)Object.methodOverride [as handle]( C:\用戶\菲利普\文件\腳本\塔\測試\ TEST01 \ node_modules \塔\ node_modules \連接\ lib中\中間件\ methodOverride.js:37: 5) at next(C:\ Users \ Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ node_modules \ tower \ node_modules \ connect \ lib \ proto.js:199:15) at multipart(C:\ Users \ (C:\ Users \ Philipp \ Documents \ Scripts \ tower)下的Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ node_modules \ tower \ node_modules \ connect \ lib \ middleware \ multipart.js:64:37) (C:\ Users \ Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ node_modules \ tower \ test \ test01 \ node_modules \ tower \ node_modules \ connect \ lib \ middleware \ bodyParser.js:57:9) 。 node_modules \ connect \ lib \ middleware \ urlencoded.js:51:37) at module.exports(C:\ Users \ Philipp \ Documents \ Scripts \ tower \ Tests \ test01 \ node_modules \ tower \ node_modules \ connect \ lib \ middleware \ bodyParser.js:55:7)在windows 8上運行towerjs給出TypeError

I試圖找出發生了什麼,並找出模塊 \ node_modules \ tower \ lib \ tower-middleware \ server \ agent.js 該方法調用 mac:!! agent.os.match(/ mac/i),代理.os.match(/ win/i), linux:!! agent.os.match(/ linux/i) 失敗,因爲agent.os是對象類型而不是字符串。 我用 mac替換了行:!! agent.os.toString()。match(/ mac/i), windows:!! agent.os.toString()。match(/ win/i), linux :!! agent.os.toString()。match(/ linux/i) 塔啓動並運行。

這是代碼中的錯誤還是我的安裝有問題?

首先我安裝塔NPM安裝-g 然後,我創建了塔新TEST01一個應用 接下來的步驟是功率: - CD TEST01 - NPM安裝 - 永遠server.js(失敗永遠不安裝) - npm永遠安裝-g - 永遠server.js(失敗的mongod未啓動) - (已啓動mongodb) - 永遠server.js(正在運行) - 蛋糕手錶(在另一個提示 - 失敗,因爲咕嚕聲缺少) - npm install grunt -g - 蛋糕手錶(現在正在運行) - (去瀏覽r和輸入http://localhost:3000) - 上述(見錯誤描述)

回答

1

似乎是一個最新的錯誤,可能是一些在node.js中的最新版本或塔的其他depencies之一發生了變化,我注意到塔卻突然得到了一個在過去的幾天裏幾乎沒有這方面的錯誤報告,看起來像someone submitted a patch last night ,所以請注意要麼接受請求,要麼將其拉入自己的塔樓。js並再試一次。

相關問題