Heroku Error - Timed out running buildpack Node.js

Viewed 2000

I made a push to Heroku and got the following error:

-----> Building on the Heroku-18 stack
-----> Node.js app detected
       
-----> Creating runtime environment
   
   NPM_CONFIG_LOGLEVEL=error
   NODE_ENV=production
   NODE_MODULES_CACHE=true
   NODE_VERBOSE=false
   
-----> Installing binaries

   engines.node (package.json):  14.x
   engines.npm (package.json):   unspecified (use default)
   
   Resolving node version 14.x...
   Downloading and installing node 14.15.4...
   Using default npm version: 6.14.10
   
-----> Restoring cache
   Cached directories were not restored due to a change in version of node, npm, yarn or stack
   Module installation may take longer for this build
   
-----> Installing dependencies
       Installing node modules
   
   > fsevents@1.2.13 install /tmp/build_14df285a/node_modules/webpack-dev-server/node_modules/fsevents
   > node install.js
   
   
   Skipping 'fsevents' build as platform linux is not supported
   
   > fsevents@1.2.13 install /tmp/build_14df285a/node_modules/watchpack-chokidar2/node_modules/fsevents
   > node install.js
   
   
   Skipping 'fsevents' build as platform linux is not supported
   added 1021 packages in 28.668s
   
-----> Build Running build
   
   > foo-bar@0.1.0 build /tmp/build_14df285a
   > webpack --config webpack.prod.js --env.NODE_ENV=prod

 Webpack Bundle Analyzer is started at http://127.0.0.1:8888
       Use Ctrl+C to close it
       Hash: c56aad45799a37467c52
       Version: webpack 4.46.0
       Time: 34310ms
       Built at: 01/26/2021 11:54:18 AM
                Asset       Size  Chunks                    Chunk Names
         ./index.html  250 bytes          [emitted]         
       main.bundle.js   1.26 MiB       0  [emitted]  [big]  main
       Entrypoint main [big] = main.bundle.js
        [21] (webpack)/buildin/global.js 472 bytes {0} [built]
        [55] (webpack)/buildin/module.js 497 bytes {0} [built]
        [69] multi ./node_modules/antd-dayjs-webpack-plugin/src/init-dayjs-webpack-plugin-entry.js ./index.js 40 bytes {0} [built]
        [86] (webpack)/buildin/harmony-module.js 573 bytes {0} [built]
       [237] ./styles/index.scss 560 bytes {0} [built]
       [238] ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./styles/index.scss
6.41 KiB {0} [built]
       [239] ./index.js + 585 modules 1.63 MiB {0} [built]
             | ./index.js 1.06 KiB [built]
             | ./redux/reducers/index.js 243 bytes [built]
             | ./redux/saga/index.js 9.92 KiB [built]
             | ./containers/mangement.js 1.99 KiB [built]
             | ./containers/routes.js 3.67 KiB [built]
             | ./redux/consts.js 1.18 KiB [built]
             | ./redux/reducers/auth.js 5.72 KiB [built]
             | ./redux/reducers/education.js 5.17 KiB [built]
             | ./redux/reducers/management.js 2.33 KiB [built]
             | ./redux/actions/management.js 937 bytes [built]
             | ./redux/actions/auth.js 5.81 KiB [built]
             | ./containers/header.js 6.66 KiB [built]
             | ./containers/home.js 1.03 KiB [built]
             | ./containers/about.js 1.36 KiB [built]
             | ./containers/redirect.js 6.64 KiB [built]
             |     + 571 hidden modules
           + 1740 hidden modules
       
       WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB).
       This can impact web performance.
       Assets: 
         main.bundle.js (1.26 MiB)
       
       WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance.
       Entrypoints:
         main (1.26 MiB)
             main.bundle.js
       
       
       WARNING in webpack performance recommendations: 
       You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application.
       For more info visit https://webpack.js.org/guides/code-splitting/
       Child HtmlWebpackCompiler:
            1 asset
           Entrypoint HtmlWebpackPlugin_0 = __child-HtmlWebpackPlugin_0
           [0] ./node_modules/html-webpack-plugin/lib/loader.js!./index.html 293 bytes {0} [built]
-----> Timed out running buildpack Node.js /tmp/codon/tmp/buildpacks/2cd3309e34d34b154aac9f665b0eb2d2e86d8b8e/lib/monitor.sh: line 1: kill: (1293) - No such process  !     Push failed

Previous pushes to Heroku worked.

I am getting a timeout error. Why does it say, "No such process." I couldn't find this error in the Heroku docs and various Google searches. Does anybody know why the push failed? I would really appreciate it. Thanks.

2 Answers

I faced the same problem and my Heroku build was failing but it looks like the problem was that Heroku build command was contradicting the one I had in my package.json

This is how my package.json looked like when the build was failing.

enter image description here

After removing that build script the problem was solved

enter image description here

I installed webpack-bundle-analyzer and I guess that caused the problem since when I removed it the heroku push succeeded.

Related