我有一個帶有webpack和gulp的AngularJs應用程序。它建立在https://github.com/AngularClass/NG6-starter之上,我想將它部署在Heroku.com上。從生成日誌看起來一切都很好,當我嘗試訪問Web應用程序,我收到以下消息: 在Heroku上部署AngularJs + webpack + gulp
從Heroku的應用程序日誌:
2016-07-25T11:48: 27.455165 + 00:00 app [web.1]:npm ERR!或者如果沒有,您可以通過以下方式獲取他們的信息:
2016-07-25T11:48:27.455164 + 00:00 app [web.1]:npm ERR! NPM錯誤NG6 - 起動機
2016-07-25T11:48:27.462393 + 00:00應用程式[web.1]:
2016-07-25T11:48:27.462658 + 00:00應用程式[幅。 1]:npm ERR!請在任何支持請求中包含以下文件:
2016-07-25T11:48:27.455166 + 00:00 app [web.1]:npm ERR! npm owner ls ng6-starter
2016-07-25T11:48:27.455163 + 00:00 app [web.1]:npm ERR! gulp服務
2016-07-25T11:50:18.830449 + 00:00 heroku [router]:at = error code = H10 desc =「App crashed」method = GET path =「/」host = someapp.herokuapp。 com request_id = x fwd =「0.0.0.0」dyno = connect = service = status = 503 bytes =
2016-07-25T11:50:19.372880 + 00:00 heroku [router]:at = error code = H10 desc =「App crashed」method = GET path =「/ favicon.ico」host = someapp.herokuapp.com request_id = x fwd =「0.0.0.0」dyno = connect = service = status = 503 bytes =
在我的package.json文件中,我添加了
"scripts": {
"test": "karma start",
"build": "gulp webpack",
"start": "gulp"
}
從Heroku的構建日誌:
Node.js app detected
Creating runtime environment
NPM_CONFIG_LOGLEVEL=error
NPM_CONFIG_PRODUCTION=true
NODE_ENV=production
NODE_MODULES_CACHE=true
Installing binaries
engines.node (package.json): unspecified
engines.npm (package.json): unspecified (use default)
Resolving node version (latest stable) via semver.io...
Downloading and installing node 5.11.1...
Using default npm version: 3.8.6
Restoring cache
Loading 2 from cacheDirectories (default):
- node_modules
- bower_components (not cached - skipping)
Building dependencies
Installing node modules (package.json)
Caching build
Clearing previous node cache
Saving 2 cacheDirectories (default):
- node_modules
- bower_components (nothing to cache)
Build succeeded!
├── [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]
├── [email protected]
├── [email protected]
└── [email protected]
Discovering process types
Procfile declares types -> (none)
Default types for buildpack -> web
Compressing...
Done: 50.8M
Launching...
Released v12
https://someapp.herokuapp.com/ deployed to Heroku
我有點丟在這裏,任何幫助是極大的appriciated。
用gulp命令你能啓動應用程序嗎? – uzaif
是的,我可以用「gulp」啓動我的應用程序,它會在本地運行良好 –
是否有任何模塊未安裝在heroku – uzaif