尝试在Heroku上部署我的应用时,我遇到以下错误:
private void btnFunktionX_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
string textboxnumber = (((System.Windows.Controls.Button)sender).Name) [(((System.Windows.Controls.Button)sender).Name).Length - 1].ToString();
Storyboard sb = new Storyboard();
ThicknessAnimationUsingKeyFrames tauk = new ThicknessAnimationUsingKeyFrames();
tauk.BeginTime = new TimeSpan(0);
tauk.SetValue(Storyboard.TargetNameProperty, "btnFunktion"+textboxnumber);
tauk.SetValue(Storyboard.TargetPropertyProperty, new PropertyPath("FrameworkElement.Margin"));
EasingThicknessKeyFrame easing = new EasingThicknessKeyFrame();
easing.KeyTime = TimeSpan.FromSeconds(0.2);
easing.Value = Usedmargin[chosentextbox];
tauk.KeyFrames.Add(easing);
sb.Children.Add(tauk);
sb.Begin(this);
}
我知道我应该“实时”运行它,而不是从localhost运行它,所以我通过CLI设置以下设置:
Cannot GET /
NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
Server is being run outside of live development mode, meaning it will only serve the compiled application bundle in ~/dist. Generally you do not need an application server for this and can instead use a web server such as nginx to serve your static files. See the "deployment" section in the README for more information on deployment strategies.
我还应该检查什么。该应用程序是此锅炉的克隆:https://github.com/davezuko/react-redux-starter-kit
我的Heroku链接是:https://hidden-temple-43853.herokuapp.com/
答案 0 :(得分:0)
假设您没有使用Procfile告诉Heroku如何启动您的应用,请改为npm start
will be used的package.json
脚本。
在部署到Heroku之前,您是否使用npm run deploy
运行NODE_ENV=production
?
Have a look at this issue在部署到Heroku时修改了一个修复程序(在下面复制)。
// ...
// ------------------------------------
// Apply Webpack HMR Middleware
// ------------------------------------
if (config.env === 'development') {
const webpackDevMiddleware = require('./middleware/webpack-dev').default
const webpackHMRMiddleware = require('./middleware/webpack-hmr').default
const compiler = webpack(webpackConfig)
// Enable webpack-dev and webpack-hot middleware
const { publicPath } = webpackConfig.output
app.use(webpackDevMiddleware(compiler, publicPath))
app.use(webpackHMRMiddleware(compiler))
// ...