2017-06-02 143 views
0

該應用程序在窗口中'npm start'後運行良好,但是當我從github拉入Heroku時,只是出現錯誤。React應用程序在本地運行,崩潰時Heroku錯誤代碼= H10

的package.json:

{ 
    "name": "tic-tac-toe", 
    "version": "0.1.0", 

    "dependencies": { 
    "react": "^15.5.4", 
    "react-dom": "^15.5.4" 
    }, 
    "engines": { 
     "node": "6.10.3", 
     "npm":"3.10.10" 
    }, 
    "devDependencies": { 
    "react-scripts": "1.0.7" 
    }, 
    "scripts": { 
    "start": "react-scripts start", 
    "build": "react-scripts build", 
    "test": "react-scripts test --env=jsdom", 
    "eject": "react-scripts eject" 
    } 
} 

和錯誤日誌:

app[web.1]: npm ERR!  npm bugs tic-tac-toe 
app[web.1]: npm ERR! Or if that isn't available, you can get their info via: 
app[web.1]: npm ERR!  npm owner ls tic-tac-toe 
app[web.1]: npm ERR! There is likely additional logging output above. 
app[web.1]: 
app[web.1]: npm ERR! Please include the following file with any support request: 
app[web.1]: npm ERR!  /app/npm-debug.log 
heroku[web.1]: Process exited with status 1 
heroku[web.1]: State changed from starting to crashed 
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=react-tac-to.herokuapp.com request_id=c3cf2461-1989-4734-a7d5-157eb81c9643 fwd="24.29.73.46" dyno= connect= service= status=503 bytes= protocol=https 
heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=react-tac-to.herokuapp.com request_id=05109629-cbb4-4927-9d13-8a3a37fedb93 fwd="24.29.73.46" dyno= connect= service= status=503 bytes= protocol=https 

問題的性質讓我覺得這是基於配置,而不是在主app.js代碼。 主要文件稍長,所以我會鏈接到它在Github上,如果你想看到它: https://github.com/owenpercoco/React-Tac-Toe

+0

一眼就能確認'react-scripts'安裝正確嗎?我相信heroku默認會忽略'devDependencies'模塊。將它移到'dependencies'列表可能可以解決這個問題。 – hainq

回答

相關問題