简体   繁体   中英

How succesfully push my node app to Heroku?

I created my react app and am trying second day to push it to Heroku with git push Heroku master. I get an error. I tried all the common solutions from Heroku support and stackoverflow. I must be missing some crutial part. Can anybody please help me? This is what Heroku logs show:

Installing dependencies
       Installing node modules (package.json + package-lock)

       > node@13.8.0 preinstall /tmp/build_0b181828458420237db1b578ab12a219/node_modules/node
       > node installArchSpecificPackage

       npm ERR! code ETARGET
       npm ERR! notarget No matching version found for node-linux-x64@13.8.0.
       npm ERR! notarget In most cases you or one of your dependencies are requesting
       npm ERR! notarget a package version that doesn't exist.

       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.TaYmU/_logs/2020-02-19T18_52_08_718Z-debug.log
       internal/modules/cjs/loader.js:796
           throw err;
           ^

       Error: Cannot find module 'node-linux-x64/package.json'
       Require stack:
       - /tmp/build_0b181828458420237db1b578ab12a219/node_modules/node/installArchSpecificPackage.js
           at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
           at Function.resolve (internal/modules/cjs/helpers.js:80:19)
           at ChildProcess.<anonymous> (/tmp/build_0b181828458420237db1b578ab12a219/node_modules/node-bin-setup/index.js:18:27)
           at ChildProcess.emit (events.js:223:5)
           at maybeClose (internal/child_process.js:1021:16)
           at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5) {
         code: 'MODULE_NOT_FOUND',
         requireStack: [
           '/tmp/build_0b181828458420237db1b578ab12a219/node_modules/node/installArchSpecificPackage.js'
         ]
       }
       npm ERR! code ELIFECYCLE
       npm ERR! errno 1
       npm ERR! node@13.8.0 preinstall: `node installArchSpecificPackage`
       npm ERR! Exit status 1
       npm ERR! 
       npm ERR! Failed at the node@13.8.0 preinstall script.
       npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

       npm ERR! A complete log of this run can be found in:
       npm ERR!     /tmp/npmcache.TaYmU/_logs/2020-02-19T18_52_10_684Z-debug.log
-----> Build failed

       We're sorry this build is failing! You can troubleshoot common issues here:
       https://devcenter.heroku.com/articles/troubleshooting-node-deploys

       Some possible problems:

       - A module may be missing from 'dependencies' in package.json
         https://devcenter.heroku.com/articles/troubleshooting-node-deploys#ensure-you-aren-t-relying-on-untracked-dependencies

       Love,
       Heroku

 !     Push rejected, failed to compile React.js (create-react-app) multi app.
 !     Push failed

Thank you!!!

Solved it! The solution was to delete node dependence from package.json.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM