Error message occurs when attempting to deploy rails/react app due to incompatible buildpack

After successfully deploying a Rails app on Heroku, I am now facing challenges with deploying a Rails/React app on the same platform. I have added both Node.js and Ruby buildpacks but seem to be missing a crucial connection between the two environments. Any guidance or assistance would be greatly appreciated as I encounter the following error message. Thank you in advance!


remote: -----> Build
remote:        Detected both "build" and "heroku-postbuild" scripts
remote:        Running heroku-postbuild
        
        > [email protected] heroku-postbuild /tmp/build_0df26b25
        > npm run build && npm install
        
        
        > [email protected] build /tmp/build_0df26b25
        > react-scripts build
        
        Creating an optimized production build...
        Compiled successfully.
        
        File sizes after gzip:
        
          63.32 KB  build/static/js/2.b0463501.chunk.js
          2.48 KB   build/static/js/main.61d8b38a.chunk.js
          783 B     build/static/js/runtime-main.44a3a2b0.js
          690 B     build/static/css/main.10cdadf4.chunk.css
        
        The project was built assuming it is hosted at /.
        You can control this with the homepage field in your package.json.
        
        The build folder is ready to be deployed.
        You may serve it with a static server:
        
          npm install -g serve
          serve -s build
        
        Find out more about deployment here:
        
          bit.ly/CRA-deploy
        
        removed 35 packages and audited 1737 packages in 14.177s
        
        71 packages are looking for funding
          run `npm fund` for details
        
        found 0 vulnerabilities
        
        
remote: -----> Caching build
        - node_modules
        
        
remote: -----> Pruning devDependencies
        removed 35 packages and audited 1737 packages in 12.724s
        
        71 packages are looking for funding
          run `npm fund` for details
        
        found 0 vulnerabilities
        
        
remote: -----> Build succeeded!
remote: -----> App not compatible with buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
        More info: https://devcenter.heroku.com/articles/buildpacks#detection-failure
        
! Push failed
Verifying deploy...
      
!       Push rejected to gonefishin-frontend.

To https://git.heroku.com/gonefishin-frontend.git

And here is my package.json:


{
  "name": "gone-fishin-frontend",
  "version": "0.1.0",
  "private": true,
  "engines": {
    "npm": "6.14.6",
    "node": "14.5.0"
  },
  "proxy": "http://localhost:3001",
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "react": "^16.13.1",
    "react-dom": "^16.13.1",
    "react-redux": "^7.2.1",
    "react-router-dom": "^5.2.0",
    "react-scripts": "^3.4.3",
    "redux": "^4.0.5",
    "redux-thunk": "^2.3.0",
    "styled-components": "^5.1.1"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "deploy": "cp -a client/build/. public/",
    "heroku-postbuild": "npm run build && npm install",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

Answer №1

remote: -----> The application does not support the specified buildpack: https://buildpack-registry.s3.amazonaws.com/buildpacks/heroku/ruby.tgz
remote:        For more information, please refer to: https://devcenter.heroku.com/articles/buildpacks#detection-failure

For additional details, check out the Heroku article link.

You can access the Ruby detect script here.

Your project is incompatible with the Ruby buildpack since it lacks a Gemfile in the root directory of your git repository.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

how can I enable pass-through functionality in express middleware?

Currently, I have a POST API endpoint named /users which is used to retrieve the list of users. The reason behind using POST instead of GET is because the request body can be quite large and it may not fit in the URL for a GET request. In this scenario, i ...

Tips for integrating Jquery into your Laravel project

There is an issue that I am facing on this particular line of code <script type="text/javascript" src="js/jquery.js"></script> I suspect the error is due to jQuery not being installed in my Laravel project. I typically use npm for installin ...

Setting up models routes in Node and Express: A comprehensive guide

In my model file, I have a set of routes exported like this: const newsRoutes = (app: express.Application): void => { app.get('/news', readAll); app.get('/news/:id', readOne); }; To use these routes, I import the function and pa ...

How can I access the id_lang variable in React JS from outside its scope?

How do I access the 'id_lang' variable outside of the render function in order to pass it down for checking? const Navbar = () => { const getID = async (id) => { let id_lang = id; console.log(id_lang); } ret ...

Node accurately handles and displays errors, such as validation errors, in a precise manner

I am currently restructuring our code base to incorporate promises. Below are two blocks of sample code: user.service.js export function updateUserProfileByUsername(req, res) { userController.getUserByUsername(req.params.username) .then((userProfile ...

creating a post action using Node.js with Express and Angular

Process Overview I have an Angular post that communicates with my Node.js Express backend to send data to an API. My goal is to redirect the user to a different Angular page upon successful post, or display an error message if the post fails. One approac ...

Utilizing dynamic routes in Express.js

I am looking to implement a dynamic route that can be modified during the execution of the program. For instance, instead of having a fixed route like app.get('/', function(req, res) {/*Something here*/};, I would like to use a variable in place ...

Obtaining the socket.io connection associated with the HTTP request

I am currently integrating socket.io with Express. For instance, if the user accesses the primary route /, and the request is directed to: app.get('/',function(req,res,next){ var msg =...; socket.emit('channel',msg); //how can ...

Is there a way to sort data by year and month in mongodb?

I'm trying to filter data by year in MongoDB based on a specific year and month. For example, if I pass in the year 2022, I only want to see data from that year. However, when I try using the $gte and $lte tags, it returns empty results. Can someone g ...

Receiving corrupt files while pulling image data from node server (using gridfs-stream)

After conducting an extensive search on platforms like Stack Overflow and Reddit, as well as going through numerous related posts, I decided to share my experience. Even though it's been a bit of a struggle, I refuse to give up so easily :) The proce ...

Is it necessary to download all npm packages when starting a new project?

I recently started learning about npm packages and node. I noticed that when installing packages, they create numerous folders in the "node modules" directory. This got me thinking - when starting a new project, do I need to re-install all these packages ...

This error message pop us while working with Electron - "Tried reinstalling, but still facing the issue of 'Cannot read property 'on' of undefined

While testing an electron app, I encountered a frustrating error message: "TypeError: Cannot read property 'on' of undefined" After conducting some research, I learned that this issue could be caused by a faulty module installation, a syntax er ...

Leveraging Passport JS for Global Bearer Authentication

NodeJS code snippet below utilizes Passport JS Bearer Authentication in Route Middleware. app.put('/api/customers/:id', passport.authenticate('bearer', {session : false}), handlers.putCustomers); app.put('/api/products/:id', ...

What methods can I use in Mocha with Sinon for testing multiple callbacks?

My code involves a function with asynchronous operations and multiple callbacks var f = (cb1, cb2) => { return new Promise((resolve, reject) => { /* ... */ }); }; During testing, I wanted to use sinon to create spies var cb1Spy = sinon.spy(); va ...

Encountered an issue with Azure Pipelines while attempting to fetch "https://github.com/sass/node-sass/releases/download/v4.13.0/win32-x64-83_binding.node"

Having trouble with Azure Pipelines, unable to get it to work even after checking the Github link. Either the link is not working or the version is not found. Currently using a YAML file for Azure pipelines configuration. Struggling to locate the agent an ...

Having trouble with npm debounce in ReactJS?

When using the npm debounce package in ReactJS, I encountered an error with the code below: Javascript - Uncaught TypeError: Object(...) is not a function The error occurs when passing the function into the debounce() method. import React, { Component ...

Issues with integrating the jsPDF package into a JavaScript project

I'm struggling to solve this issue. I've been attempting to create a program that can download a pdf from a webpage using the jsPDF npm module. After downloading it, I tried importing it in two different ways: Using the node.js require statemen ...

Successfully retrieving the x-auth token from the API

I'm currently in the process of developing an API with Express For authentication, I've implemented JWTs. Here's a snippet of my code: user .generateAuthToken(body.loginPhrase) .then((token) => { res.header('x-auth&a ...

Executing a Node.js Express project in public mode

Usually, I have no issues running my project on Linux as public. However, I am now trying to run the project on Windows as public. I have set up rules for Windows Firewall, but when I try to open the page 192.168.0.106:3000, I receive an error stating that ...

Implementing user authentication in node.js with passport

Having trouble with a basic login system using passport. I keep getting an error when logging in with the correct credentials: Error: Express 500 TypeError - Cannot read property 'passport' of undefined Oddly enough, everything works fine when ...