Сбой развертывания в Heroku (React / Node monorepo) - PullRequest
0 голосов
/ 09 июля 2020

Я пытаюсь развернуть проект monorepo (react cra и node / express) tot heroku через cli, и я продолжаю получать ошибки сборки, которые мне не удалось отладить.

Текущая ошибка показано ниже, и я пробовал рекомендуемые шаги, но изменений все еще нет.

       Binary is fine
remote:        added 1862 packages from 939 contributors and audited 1935 packages in 55.705s
remote:        
remote:        66 packages are looking for funding
remote:          run `npm fund` for details
remote:        
remote:        found 1 low severity vulnerability
remote:          run `npm audit fix` to fix them, or `npm audit` for details
remote:        
remote:        > oda-bus-app@0.1.0 build /tmp/build_f76756c050c445431d02fd708ee1a1c8/client
remote:        > react-scripts build
remote:        
remote: 
remote: There might be a problem with the project dependency tree.
remote: It is likely not a bug in Create React App, but something you need to fix locally.
remote: 
remote: The react-scripts package provided by Create React App requires a dependency:
remote: 
remote:   "babel-jest": "^24.9.0"
remote: 
remote: Don't try to install it manually: your package manager does it automatically.
remote: However, a different version of babel-jest was detected higher up in the tree:
remote: 
remote:   /tmp/build_f76756c050c445431d02fd708ee1a1c8/node_modules/babel-jest (version: 26.1.0) 
remote: 
remote: Manually installing incompatible versions is known to cause hard-to-debug issues.
remote: 
remote: If you would prefer to ignore this check, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
remote: That will permanently disable this message but you might encounter other issues.
remote: 
remote: To fix the dependency tree, try following the steps below in the exact order:
remote: 
remote:   1. Delete package-lock.json (not package.json!) and/or yarn.lock in your project folder.
remote:   2. Delete node_modules in your project folder.
remote:   3. Remove "babel-jest" from dependencies and/or devDependencies in the package.json file in your project folder.
remote:   4. Run npm install or yarn, depending on the package manager you use.
remote: 
remote: In most cases, this should be enough to fix the problem.
remote: If this has not helped, there are a few other things you can try:
remote: 
remote:   5. If you used npm, install yarn (http://yarnpkg.com/) and repeat the above steps with it instead
remote:      This may help because npm has known issues with package hoisting which may get resolved in future versions.
remote: 
remote:   6. Check if /tmp/build_f76756c050c445431d02fd708ee1a1c8/node_modules/babel-jest is outside your project directory.
remote:      For example, you might have accidentally installed something in your home folder.
remote: 
remote:   7. Try running npm ls babel-jest in your project folder.
remote:      This will tell you which other package (apart from the expected react-scripts) installed babel-jest.
remote: 
remote: If nothing else helps, add SKIP_PREFLIGHT_CHECK=true to an .env file in your project.
remote: That would permanently disable this preflight check in case you want to proceed anyway.
remote: 
remote: P.S. We know this message is long but please read the steps above :-) We hope you find them helpful
remote: 
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! oda-bus-app@0.1.0 build: `react-scripts build`
remote: npm ERR! Exit status 1
remote: npm ERR! 
remote: npm ERR! Failed at the oda-bus-app@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.ZcMNO/_logs/2020-07-09T06_59_12_051Z-debug.log
remote: npm ERR! code ELIFECYCLE
remote: npm ERR! errno 1
remote: npm ERR! busdashboard-v2@1.0.0 build: `cd client && npm install && npm run build`
remote: npm ERR! Exit status 1
remote: npm ERR! 
remote: npm ERR! Failed at the busdashboard-v2@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.ZcMNO/_logs/2020-07-09T06_59_12_063Z-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 oda-bus-app.
remote: 
To https://git.heroku.com/oda-bus-app.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/oda-bus-app.git'

мое репо доступно здесь: github repo

Что еще я могу попробовать?

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...