2012-08-29 60 views
4

似乎有一個奇怪的問題,我的應用程序在Heroku上雪松堆棧部署在我的節點處理甚至不被調用Heroku的Node.js的慶典:節點:找不到命令

我Procfile是如下:

web: node web.js 

和我的package.json文件:

{ 
"name": "fuuzik", 
"version": "0.0.1", 
"dependencies": { 
    "express": "3.x", 
    "jade":"*", 
    "mime-magic":"*" 
    }, 
"engines": { 
    "node": "0.8.x", 
    "npm": "1.1.x" 
    } 
} 

所以以後我承諾,推動Heroku的檢測它的一個節點應用罰款和建立正確我的依賴關係,甚至說,它部署..但在應用上部署立即應聲而Heroku的日誌時返回:

2012-08-29T08:52:14+00:00 heroku[api]: Deploy d9fdb17 by [email protected] 
2012-08-29T08:52:14+00:00 heroku[web.1]: State changed from crashed to starting 
2012-08-29T08:52:14+00:00 heroku[slugc]: Slug compilation finished 
2012-08-29T08:52:16+00:00 heroku[web.1]: Starting process with command `node web.js` 
2012-08-29T08:52:16+00:00 app[web.1]: bash: node: command not found 
2012-08-29T08:52:17+00:00 heroku[web.1]: Process exited with status 127 
2012-08-29T08:52:17+00:00 heroku[web.1]: State changed from starting to crashed 

工頭運行良好,並有一對夫婦的周圍的根目錄.php文件(因爲我移植一些舊的代碼),但我敢肯定應該由Procfiles

如這裏要求的邏輯被允許的NPM的輸出本地安裝:

--[/DEBUG]-- 
[email protected] node_modules/jade 
├── [email protected] 
└── [email protected] 

[email protected] node_modules/express 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] 
├── [email protected] ([email protected]) 
└── [email protected] ([email protected], [email protected], [email protected], [email protected]) 

[email protected] node_modules/mime-magic 

和這裏的git的日誌,當我把(這是一個有點大,所以我聯繫吧):

http://pastebin.com/d424TBfR

任何幫助表示讚賞!

+0

是否有所作爲,如果你指定節點/ NPM一個完整版本(不.X)? –

+0

剛剛試過節點0.8.7和npm 1.1.4 ..我也嘗試刪除我的本地node_modules文件夾(雖然這不應該是相關的或任何東西)沒有運氣.. :( –

+0

當你運行'npm install'時會發生什麼?本地?此外,提供早期的輸出,當你推到Heroku –

回答

0

Libmagic(mime-magic需要)預計會有不同版本的libc,然後由heroku提供。你需要找到一個替代庫或者編譯你自己的heroku版本的libc。

3

嘗試刪除您的Procfile。

顯然,Procfile指示heroku使用node main.js運行應用程序,但由於節點不包含在PATH變量等中,因此節點不是有效的命令。

通過刪除Procfile,heroku檢測到該應用程序是流星應用程序,並使用具有完整路徑的節點二進制文件運行該應用程序。

另外,記得ROOT_URL必須以http開頭設置://