I am on ReactJS v15.3.1, using node v8.3.1 and npm v5.0.4
I am trying to implement a react app using this theme SB Admin React
it's working fine when I run this into the localhost all pages loads fine and everything working as expected, but when I move this theme to my AWS machine with the same configurations(node and npm) as my localhost it starts throwing this error on browser console:
GET http://34.192.38.113:3001/assets/main.js?6f764c822b1f287a2e02 net::ERR_CONTENT_LENGTH_MISMATCH
Maybe because of this whenever I click on any link on my theme page on browser it refresh the page and shows the same error
I tried using different themes as well but the same error (highlighted in code block) persist with all of them.
I am unable to get the root cause for this,
Also, I've made all the ports available in my AWS machine.
How to rectify this issue?
Related
I developed a simple web site using HTML and TypeScript and ran the web server using Parcel.
npx parcel index.html
Now it looks okay in the terminal.
But I can connect on the browser.
I was able to connect localhost:3000 when I worked on Next.js app before but now I can't even connect to this app's server as well as Parcel's server localhost:1234 .
I guess there happens common tricky issues related to localhost.
Please let me know what I should do to figure out this.
I've already followed this link but nothing was figured out...
Also I tried on not only Google Chrome but also Mozilla Firefox and IE but there were same issues..
Everything looks fine with my code but when deployed to localhost it's showing,
I even tried disabling all the components, npm install but no.
terminal, it's looking fine
Dependencies
Browser Console
Can you send the photo of the browser's console?Maybe we can see
Node js environment doesnt show you the errors because react works on client's browser.
I am using nodeJS and expressJS for backend and ReactJS for frontend of my application. Everything works fine when run locally on my computer. However, I recently have tried to deploy the app using Heroku. The app successfully launches at the given link from Heroku but then whenever I try to sign in/sign up I'm always thrown an error from the backend. The error is as follows when I am using Safari and Google Chrome respectively:
I have already enabled cors on my expressJS server, what is the likely cause of the issue?
It looks like your ReactJS code has the url http://localhost:5000/ hard coded in it somewhere. If your same Heroku instance serves the ReactJS and provides your API endpoints, then you should consider using
/api/users/signup
for the URL of your API endpoint instead of
http://localhost:5000/api/users/signup
This wrong URL shows up as an access control issue because browsers block external pages served by https to use localhost APIs. Because cybercreeps.
I've created a node webapp with express-generator, this app works great on localhost.
But as soon as i move my app to the server and surf the domain, it shows the content of the app.js file instead of executing it, i've tried to reproduce this issue on localhost without success.
I've also checked the configuration of the web server, looks good so far.
If i run the app on localhost, the app.js file gets executed without any problems, but on the webserver the file content is shown only and nothing executes.
This only happens with the app.js file, any other file of the app works fine, views are rendered and routes are working.
I'm grateful for any help!
Some additional information:
OS: Windows Server 2016 Datecenter
Node 12
Node app deployed via Plesk Obsidian
This is solved, it looks like this is a problem with iisnode since the app works as it should when it runs as a service
I have a nodejs application working on my laptop. I can view it in the browser by going to http://localhost:3030/.
I have installed nodejs,npm and all the packages I need on a server and copied all the files on the server as well.
When I start the application using node app it seems to be running fine. But It can not find any of the public static content, client-side javascript, client-side css etc. I see 404 errors in my browser console.
All nodejs tutorials seems to stop at localhost.. how to deploy an app on a server?