を固定が、私は私がHerokuのにアプリを反応させる展開しようとしているが、Herokuのログでこのエラーメッセージが表示されました午前、Herokuのポート割り当てエラー、私はそれを
2017-04-11T04:54:31.000000+00:00 app[api]: Build started by user [email protected]
2017-04-11T04:55:05.124340+00:00 app[api]: Deploy 8f241f1 by user [email protected]
2017-04-11T04:55:05.124340+00:00 app[api]: Release v8 created by user [email protected]
2017-04-11T04:54:31.000000+00:00 app[api]: Build succeeded
2017-04-11T04:55:05.490326+00:00 app[api]: Release v8 created by user [email protected]
2017-04-11T04:55:05.742229+00:00 heroku[web.1]: State changed from crashed to starting
2017-04-11T04:55:09.582152+00:00 heroku[web.1]: Starting process with command `npm start`
2017-04-11T04:55:11.697099+00:00 app[web.1]:
2017-04-11T04:55:11.697113+00:00 app[web.1]: > [email protected] start /app
2017-04-11T04:55:11.697114+00:00 app[web.1]: > webpack-dev-server --progress --profile --colors
2017-04-11T04:55:11.697115+00:00 app[web.1]:
2017-04-11T04:55:12.594 70% 1/1 build modules http://127.0.0.1:54499/
2017-04-11T04:55:12.594337+00:00 app[web.1]: webpack result is served from/
2017-04-11T04:55:12.594384+00:00 app[web.1]: content is served from ./public
2017-04-11T04:55:12.594457+00:00 app[web.1]: 404s will fallback to /index.html
2017-04-11T04:55:17. 42% 73/136 build modules
2017-04-11T04:55:17 58% 180/223 build modules
2017-04-11T04:55:17.879336+00:00 app[web.1] 63% 281/315 build modules
2017-04-11T04:55:17.879336+00:0 63% 373/415 build modules
2017-04-11T04:55:17.879 68% 484/496 build modules
2017-04-11T04:55:17.879336+00:00 app[we5304ms build modules
2017-04-11T04:55:17.886137+00:00 app8ms seal
2017-04-11T04:55:17.896354+00:0010ms optimize
2017-04-11T04:55:17.908569+00:00 12ms hashing
2017-04-11T04:55:18.762ms create chunk assets
2017-04-11T04:55:18ms additional chunk assets
2017-04-11T04:55:180ms optimize chunk assets
2017-04-11T04:55:18.8373149ms optimize assets
2017-04-11T04:55:18.896612+00:00 app59ms emit
2017-04-11T04:56:10.046877+00:00 app[web.1]: Error waiting for process to
terminate: No child processes
2017-04-11T04:56:10.028392+00:00 heroku[web.1]: Error R10 (Boot timeout) ->
Web process failed to bind to $PORT within 60 seconds of launch
2017-04-11T04:56:10.028452+00:00 heroku[web.1]: Stopping process with SIGKILL
2017-04-11T04:56:10.147218+00:00 heroku[web.1]: Process exited with status 22
2017-04-11T04:56:10.134762+00:00 heroku[web.1]: State changed from starting to
crashed
は、だから私は、R10のエラーメッセージが表示され、多くの人が言ったことを見上げ私はHerokuによって割り当てられるPORT番号を設定していないからです。しかし、私のwebpack.config.jsは明らかにこのようなprocess.env.PORTを示すファイル:FYI
"use strict";
var webpack = require('webpack');
var path = require('path');
var loaders = require('./webpack.loaders');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var DashboardPlugin = require('webpack-dashboard/plugin');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
const HOST = process.env.HOST || "127.0.0.1";
const PORT = process.env.PORT || "8888";
loaders.push({
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', 'css?sourceMap&localIdentName=[local]___[hash:base64:5]!sass?outputStyle=expanded'),
exclude: ['node_modules']
});
module.exports = {
entry: [
'react-hot-loader/patch',
'./src/index.jsx', // your app's entry point
'./styles/index.scss'
],
debug: true,
devtool: '#eval-source-map',
output: {
publicPath: '/',
path: path.join(__dirname, 'public'),
filename: 'bundle.js'
},
resolve: {
extensions: ['', '.js', '.jsx']
},
module: {
loaders
},
devServer: {
contentBase: "./public",
// do not print bundle build stats
noInfo: true,
// enable HMR
hot: true,
// embed the webpack-dev-server runtime into the bundle
inline: true,
// serve index.html in place of 404 responses to allow HTML5 history
historyApiFallback: true,
port: PORT,
host: HOST
},
plugins: [
new webpack.NoErrorsPlugin(),
new webpack.HotModuleReplacementPlugin(),
new ExtractTextPlugin("style.css", {
allChunks: true
}),
new DashboardPlugin(),
new HtmlWebpackPlugin({
template: './src/template.html',
files: {
css: ['style.css'],
js: [ "bundle.js"],
}
}),
]
};
、私の全体のgithubのレポはhereです。 このお手伝いをしてください!