0

I don't know why but it's impossible to push on Heroku. I don't found the error :/. Thanks for the help ^^.

It's an express application with React client (use compass)

BuildPack -> https://github.com/stephanmelzer/heroku-buildpack-nodejs-grunt-compass.git

-----> Node.js app detected
-----> Creating runtime environment

       NPM_CONFIG_LOGLEVEL=error
       NODE_VERBOSE=false
       NODE_ENV=production
       NODE_MODULES_CACHE=true
-----> Installing binaries
       engines.node (package.json):  9.11.1
       engines.npm (package.json):   unspecified (use default)

       Resolving node version 9.11.1...
       Downloading and installing node 9.11.1...
       Using default npm version: 5.6.0
-----> Restoring cache
       Skipping cache restore (new-signature)
-----> Building dependencies
       Installing node modules (package.json + package-lock)
       added 365 packages in 8.599s
-----> Caching build
       Clearing previous node cache
       Saving 2 cacheDirectories (default):
       - node_modules
       - bower_components (nothing to cache)
-----> Pruning devDependencies
       Skipping because npm 5.6.0 sometimes fails when running 'npm prune' due to a known issue
       https://github.com/npm/npm/issues/19356

       You can silence this warning by updating to at least npm 5.7.1 in your package.json
       https://devcenter.heroku.com/articles/nodejs-support#specifying-an-npm-version
-----> Build succeeded!
-----> Node.js app detected
-----> Requested node range:  9.11.1
-----> Resolved node version: 9.11.1
-----> Downloading and installing node
 !     Push rejected, failed to compile Node.js app.
 !     Push failed
  • Possible duplicate of [Push rejected, failed to compile Node.js app heroku](https://stackoverflow.com/questions/18660474/push-rejected-failed-to-compile-node-js-app-heroku) – Charlie Schliesser May 02 '18 at 18:52
  • I think this is a duplicate of https://stackoverflow.com/questions/18660474/push-rejected-failed-to-compile-node-js-app-heroku and https://stackoverflow.com/questions/13321231/fail-to-deploy-node-js-application-to-heroku, among others. Try the answers there, which are generally the same. – Charlie Schliesser May 02 '18 at 18:53

2 Answers2

0

You'll have to add the npm dependencies folder (node_modules) in .gitignore

here

Muhammad Usman
  • 10,039
  • 22
  • 39
-1

Please follow the below steps for pushing data to heroku.

  1. heroku create "app name"
  2. heroku git:clone -a "created app name"
  3. heroku git:remote -a "app name"
  4. git add .
  5. git commit -am "Initial commit"
  6. git pull heroku master
  7. git push heroku master

Inside package.json add

"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node app.js"

} for more details visit - https://www.heroku.com/nodejs

chetan mekha
  • 665
  • 6
  • 18