當我NPM安裝-d,然後按我所有的東西用git Heroku的推高手。 在我的Heroku的日誌,它會顯示:錯誤:無法找到模塊「mkdirp」推動應用的NodeJS上的Heroku
2012-05-01T00:21:37+00:00 heroku[web.1]: Starting process with command `node app.js`
2012-05-01T00:21:39+00:00 app[web.1]:
2012-05-01T00:21:39+00:00 app[web.1]: node.js:201
2012-05-01T00:21:39+00:00 app[web.1]: ^
2012-05-01T00:21:39+00:00 app[web.1]: Error: Cannot find module 'mkdirp'
2012-05-01T00:21:39+00:00 app[web.1]: at Function._load (module.js:279:25)
2012-05-01T00:21:39+00:00 app[web.1]: at Module.require (module.js:354:17)
2012-05-01T00:21:39+00:00 app[web.1]: throw e; // process.nextTick error, or 'error' event on first tick
2012-05-01T00:21:39+00:00 app[web.1]: at Function._resolveFilename (module.js:332:11)
2012-05-01T00:21:39+00:00 app[web.1]: at require (module.js:370:17)
2012-05-01T00:21:39+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/stylus/lib/middleware.js:16:14)
2012-05-01T00:21:39+00:00 app[web.1]: at Module._compile (module.js:441:26)
2012-05-01T00:21:39+00:00 app[web.1]: at Object..js (module.js:459:10)
2012-05-01T00:21:39+00:00 app[web.1]: at Module.load (module.js:348:31)
2012-05-01T00:21:39+00:00 app[web.1]: at Function._load (module.js:308:12)
2012-05-01T00:21:39+00:00 app[web.1]: at Module.require (module.js:354:17)
2012-05-01T00:21:40+00:00 heroku[web.1]: Process exited with status 1
2012-05-01T00:21:40+00:00 heroku[web.1]: State changed from starting to crashed
很顯然,我沒有這個問題時,我在本地部署。 我在我的jade模塊中有mkdirp模塊,它位於我的應用程序的node_modules內部。
我也有Procfile:
web: node app.js
這裏是我的package.json:
{
"name": "gemini"
, "version": "0.0.1"
, "contributors": [
{ "name": "****", "email": "****" }
]
, "private": true
, "engines": { "node": ">= 0.2.0" }
, "dependencies": {
"express": "2.5.1"
, "stylus": ">= 0.17.0"
, "jade": "0.3.0"
}
}
誰能請指教?謝謝!
對我而言,謝謝! – mondayguy