# React + Node Heroku deployment

**URL:** <https://forum.freecodecamp.org/t/react-node-heroku-deployment/490654>\
**Category:** General\
**Created:** [December 31, 2021, 10:25am UTC](https://forum.freecodecamp.org/t/react-node-heroku-deployment/490654 "2021-12-31T10:25:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![VasV](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/vasv/32/120559_2.png) [@VasV](https://forum.freecodecamp.org/u/VasV)\
**Post date:** [December 31, 2021, 10:25am UTC](https://forum.freecodecamp.org/t/react-node-heroku-deployment/490654/1 "2021-12-31T10:25:07Z")

</div>

Hey. I’m trying to deploy my React frontend + node.js backend to heroku, but it doesn’t work. Currently it gives an error

``  
Uncaught SyntaxError: Unexpected token ‘\<’

manifest.json:1 Manifest: Line: 1, column: 1, Syntax error.

``  
Can you please help me deploy it as I am out of ideas how to fix it? Repo - [GitHub - VasVV/RussianWeatherApp](https://github.com/VasVV/RussianWeatherApp)

---

<div class="post-metadata">

**Author:** ![anon22924398](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@anon22924398](https://forum.freecodecamp.org/u/anon22924398)\
**Post date:** [December 31, 2021, 11:55am UTC](https://forum.freecodecamp.org/t/react-node-heroku-deployment/490654/2 "2021-12-31T11:55:01Z")

</div>

Hi,

From [express.static()](https://expressjs.com/en/starter/static-files.html)

```auto
// where to look for files linked in the html 
app.use(express.static('public'))

//now see the get requests to the server
http://localhost:3000/images/kitten.jpg
http://localhost:3000/css/style.css
http://localhost:3000/js/app.js
http://localhost:3000/images/bg.png
http://localhost:3000/hello.html

```

Those are looked up under `/public`, for example `/public/images/kitten.jpg`

In your case, you’re requesting to: `/RussianWeatherApp/<myFilePath>` Your server is adding that to the static path, i.e

The solution is writing:

```auto
app.use('/RussianWeatherApp', express.static(path.join(__dirname, '../weathermapru/build')));

```

instead, and you will see the app loading. That sets the root for the file, basically, it changes the `/RussianWeatherApp` part to `/`.

* * *

Edit: I’ll probably push some simple changes to your project later today. It looks good.

---

<div class="post-metadata">

**Author:** ![VasV](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/vasv/32/120559_2.png) [@VasV](https://forum.freecodecamp.org/u/VasV)\
**Post date:** [December 31, 2021, 12:56pm UTC](https://forum.freecodecamp.org/t/react-node-heroku-deployment/490654/3 "2021-12-31T12:56:24Z")

</div>

Thanks a lot! After changing according to your advice and some additional tinkering with the server part I’ve finally made my app to work.

Any your commits will be very much appreciated especially considering SVG part of my app, as I have 0 experience with svg.

Thanks again and Happy New Year!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [July 2, 2022, 12:57am UTC](https://forum.freecodecamp.org/t/react-node-heroku-deployment/490654/4 "2022-07-02T00:57:01Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
