2016-11-02 3 views
0

에게 Heroku에 내 응용 프로그램을 배포하려고, 나는 다음과 같은 오류가 받고 있어요 :오류 건물 - 동형 앱

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. 

내가 아닌에서, "라이브"를 실행해야 함을 이해 localhost이므로 CLI를 통해 다음과 같은 설정을 지정합니다.

확인할 사항은 무엇입니까? 응용 프로그램은이 보일러의 클론 : https://github.com/davezuko/react-redux-starter-kit

내 Heroku가 링크는 다음과 같습니다 https://hidden-temple-43853.herokuapp.com/

답변

0

당신이 Procfile 앱 대신 package.jsonwill be usednpm start 스크립트를 실행하는 방법을 Heroku가에게 사용하지 않는 가정.

헤로 쿠에 배포하기 전에 npm run deployNODE_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)) 

// ...