ошибка: не удалось сделать pu sh некоторые ссылки на 'https://git.heroku.com/readingcom.git' - PullRequest
0 голосов
/ 20 июня 2020

! [remote rejected] master -> master (pre-receive hook declined)

Я пытался развернуть это приложение из git репо о героку, но ошибка отклоненного крючка предварительного приема продолжает появляться

введите здесь код

remote: sh: 1: react-scripts: Permission denied
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 126
remote: npm ERR! client@0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 126
remote: npm ERR!
remote: npm ERR! Failed at the client@0.1.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.SgBaJ/_logs/2020-06-19T18_16_40_663Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 126
remote: npm ERR! readingcom@1.0.0 heroku-postbuild: `NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm run build --prefix client`
remote: npm ERR! Exit status 126
remote: npm ERR!
remote: npm ERR! Failed at the readingcom@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.SgBaJ/_logs/2020-06-19T18_16_40_679Z-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:        Some possible problems:
remote:
remote:        - node_modules checked into source control
remote:          https://blog.heroku.com/node-habits-2016#9-only-git-the-important-bits
remote:
remote:        - Node version not specified in package.json
remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
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 readingcom.
remote:
To https://git.heroku.com/readingcom.git
 ! [remote rejected]   master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/readingcom.git'

Приложение представляет собой стековое приложение MERN. Я проверил и обновил свои зависимости, heroku CLI et c.

1 Ответ

0 голосов
/ 20 июня 2020

Я тоже столкнулся с подобной проблемой. Я только что создал производственную сборку с помощью «npm запустить сборку» .... а затем отправил приложение узла с папкой сборки ...

настроил это в приложении узла

app.get('*',(req,res)=>{
  res.sendFile('path to build/index.html');
})

нажал на heroku, и это сработало ... Это своего рода хакерский подход, на самом деле не решает проблему, но если вы торопитесь, можете попробовать

...