Я пытаюсь развернуть это приложение, созданное с помощью Nuxt.js, на Heroku online в универсальном режиме.
Я выполнил следующие шаги: «npm run build» и «npm run start» для заголовков, которые хорошо работали в рабочем режиме.
Тогда:
heroku create
heroku config: set NPM_CONFIG_PRODUCTION = false
heroku config: set HOST = 0.0.0.0
heroku config: set NODE_ENV = production
Затем я добавил в свой файл package.json:
heroku-postbuild": "npm run build
Я создал Procfile с: web: npm run start
И когда я делаю: git push heroku master
у меня есть эта ошибка:
remote: FATAL Nuxt Build Error
remote:
remote: at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5367:13)
remote: at processTicksAndRejections (internal/process/task_queues.js:86:5)
remote:
remote: tput: No value for $TERM and no -T specified
remote:
remote: ╭─────────────────────────────╮
remote: │ │
remote: │ ✖ Nuxt Fatal Error │
remote: │ │
remote: │ Error: Nuxt Build Error │
remote: │ │
remote: ╰─────────────────────────────╯
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! MyMovieApp@1.0.0 build: `nuxt build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the MyMovieApp@1.0.0 build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.CynTY/_logs/2019-07-09T20_01_04_895Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! MyMovieApp@1.0.0 heroku-postbuild: `npm run build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the MyMovieApp@1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.CynTY/_logs/2019-07-09T20_01_04_915Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to movie-app-luglio2019.
remote:
To https://git.heroku.com/movie-app-luglio2019.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/movie-app-luglio2019.git'
remote: FATAL Nuxt Build Error
remote:
remote: at WebpackBundler.webpackCompile (node_modules/@nuxt/webpack/dist/webpack.js:5367:13)
remote: at processTicksAndRejections (internal/process/task_queues.js:86:5)
remote:
remote: tput: No value for $TERM and no -T specified
remote:
remote: ╭─────────────────────────────╮
remote: │ │
remote: │ ✖ Nuxt Fatal Error │
remote: │ │
remote: │ Error: Nuxt Build Error │
remote: │ │
remote: ╰─────────────────────────────╯
remote:
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! MyMovieApp@1.0.0 build: `nuxt build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the MyMovieApp@1.0.0 build script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.CynTY/_logs/2019-07-09T20_01_04_895Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! MyMovieApp@1.0.0 heroku-postbuild: `npm run build`
remote: npm ERR! Exit status 1
remote: npm ERR!
remote: npm ERR! Failed at the MyMovieApp@1.0.0 heroku-postbuild script.
remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
remote:
remote: npm ERR! A complete log of this run can be found in:
remote: npm ERR! /tmp/npmcache.CynTY/_logs/2019-07-09T20_01_04_915Z-debug.log
remote:
remote: -----> Build failed
remote:
remote: We're sorry this build is failing! You can troubleshoot common issues here:
remote: https://devcenter.heroku.com/articles/troubleshooting-node-deploys
remote:
remote: If you're stuck, please submit a ticket so we can help:
remote: https://help.heroku.com/
remote:
remote: Love,
remote: Heroku
remote:
remote: ! Push rejected, failed to compile Node.js app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to movie-app-luglio2019.
remote:
To https://git.heroku.com/movie-app-luglio2019.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/movie-app-luglio2019.git'